LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
andy60
- Posts: 25
- Joined: Sun Jan 18, 2015 6:51 pm
-
Contact:
Post
by andy60 » Sat Feb 07, 2015 7:01 pm
hi, using browser control in Safari i don't see status messages, here is the code:
Code: Select all
# provide a status message that indicates loading has started
on browserStartedLoading pUrl
put "Started loading:" && pUrl into field "Status"
end browserStartedLoading
and
Code: Select all
# provide a status message that indicates loading has ended
on browserFinishedLoading pUrl
put "Finished loading:" && pURL into field "Status"
put pURL into field "url"
end browserFinishedLoading
The code is inserted in card script. My mistake? Thx for the help.
Last edited by
andy60 on Thu Feb 12, 2015 8:23 am, edited 1 time in total.
Andy Bertini
Linux: Mint 17.1 Cinnamon - Gambas 3.6.2 - Gridbox 2.99.174 patched
Mac: OSX Yosemite - Livecode Community 7.0
Blog mzSoftware: http://crmforce.netsons.org/myzone
Email: and.bertini@gmail.com
-
Klaus
- Posts: 14177
- Joined: Sat Apr 08, 2006 8:41 am
-
Contact:
Post
by Klaus » Sun Feb 08, 2015 12:41 pm
Hi Andi,
andy60 wrote:hi, using browser control in Safari
???
Could you explain a bit?
Best
Klaus
-
andy60
- Posts: 25
- Joined: Sun Jan 18, 2015 6:51 pm
-
Contact:
Post
by andy60 » Sun Feb 08, 2015 1:19 pm
Klaus wrote:Hi Andi,
andy60 wrote:hi, using browser control in Safari
???
Could you explain a bit?
Best
Klaus
excuse me Klaus for my bad english!

i post screenshot of mybrowser. My problems are:
- refresh url after end of navigation
- sent info during navigation in the field at the bottom of the window
as i show in the picture. Thx for your help.
-
Attachments
-

Andy Bertini
Linux: Mint 17.1 Cinnamon - Gambas 3.6.2 - Gridbox 2.99.174 patched
Mac: OSX Yosemite - Livecode Community 7.0
Blog mzSoftware: http://crmforce.netsons.org/myzone
Email: and.bertini@gmail.com
-
Klaus
- Posts: 14177
- Joined: Sat Apr 08, 2006 8:41 am
-
Contact:
Post
by Klaus » Sun Feb 08, 2015 1:33 pm
Hi Andy,
using browser control in Safari
this is not bad english, but just plain wrong, you are using a browser control in Livecode, right?
And again
a look into the dictionary brings enlightment!
The messages "browserStartedLoading" and "browserFinishedLoading" are MOBILE only!
On the desktop use "browserBeforeNavigate" and "browserNavigateComplete".
Best
Klaus
-
andy60
- Posts: 25
- Joined: Sun Jan 18, 2015 6:51 pm
-
Contact:
Post
by andy60 » Sun Feb 08, 2015 4:01 pm
Klaus wrote:Hi Andy,
using browser control in Safari
this is not bad english, but just plain wrong, you are using a browser control in Livecode, right?
And again
a look into the dictionary brings enlightment!
The messages "browserStartedLoading" and "browserFinishedLoading" are MOBILE only!
On the desktop use "browserBeforeNavigate" and "browserNavigateComplete".
Best
Klaus
dear Klaus, i'm a very lc enthusiast but...a newbee

Andy Bertini
Linux: Mint 17.1 Cinnamon - Gambas 3.6.2 - Gridbox 2.99.174 patched
Mac: OSX Yosemite - Livecode Community 7.0
Blog mzSoftware: http://crmforce.netsons.org/myzone
Email: and.bertini@gmail.com
-
Klaus
- Posts: 14177
- Joined: Sat Apr 08, 2006 8:41 am
-
Contact:
Post
by Klaus » Sun Feb 08, 2015 4:17 pm
Hi Andi,
this is not a question if newbie or not, but a general understanding problem
The messages "browserStartedLoading" and "browserFinishedLoading" are MOBILE only!
In other words:
The messages "browserStartedLoading" and "browserFinishedLoading" ARE ONLY being send ion iOS or Android.
And your screenshot shows a desktop app (IDE or standalone) and these commands do not work here!
Simply replace the two commands (and I mean BOTH!) in your script and that should do it:
Code: Select all
# provide a status message that indicates loading has started
on browserBeforeNavigate pUrl
put "Started loading:" && pUrl into field "Status"
end browserBeforeNavigate
# provide a status message that indicates loading has ended
on browserNavigateComplete pUrl
put "Finished loading:" && pURL into field "Status"
put pURL into field "url"
end browserNavigateComplete
Please check the dictionary next time when in doubt about syntax, you will see a little icon after: Supported Operating Systems!
Best
Klaus
-
andy60
- Posts: 25
- Joined: Sun Jan 18, 2015 6:51 pm
-
Contact:
Post
by andy60 » Sun Feb 08, 2015 4:23 pm
Klaus wrote:Hi Andi,
this is not a question if newbie or not, but a general understanding problem
The messages "browserStartedLoading" and "browserFinishedLoading" are MOBILE only!
In other words:
The messages "browserStartedLoading" and "browserFinishedLoading" ARE ONLY being send ion iOS or Android.
And your screenshot shows a desktop app (IDE or standalone) and these commands do not work here!
Simply replace the two commands (and I mean BOTH!) in your script and that should do it:
Code: Select all
# provide a status message that indicates loading has started
on browserBeforeNavigate pUrl
put "Started loading:" && pUrl into field "Status"
end browserBeforeNavigate
# provide a status message that indicates loading has ended
on browserNavigateComplete pUrl
put "Finished loading:" && pURL into field "Status"
put pURL into field "url"
end browserNavigateComplete
Please check the dictionary next time when in doubt about syntax, you will see a little icon after: Supported Operating Systems!
Best
Klaus
Solved, thx Klaus
Code: Select all
# provide a status message that indicates loading has started
on browserBeforeNavigate myBrowser,pUrl
put "Started loading:" && pUrl into field "Status"
end browserBeforeNavigate
# provide a status message that indicates loading has ended
on browserNavigateComplete mybrowser,pUrl
put pURL into field "url"
put "Finished loading:" && pUrl into field "Status"
wait for 2 seconds
put " " into field "Status"
end browserNavigateComplete
Andy Bertini
Linux: Mint 17.1 Cinnamon - Gambas 3.6.2 - Gridbox 2.99.174 patched
Mac: OSX Yosemite - Livecode Community 7.0
Blog mzSoftware: http://crmforce.netsons.org/myzone
Email: and.bertini@gmail.com
-
Klaus
- Posts: 14177
- Joined: Sat Apr 08, 2006 8:41 am
-
Contact:
Post
by Klaus » Sun Feb 08, 2015 4:26 pm
Molto bene!

-
andy60
- Posts: 25
- Joined: Sun Jan 18, 2015 6:51 pm
-
Contact:
Post
by andy60 » Sun Feb 08, 2015 5:48 pm
Klaus wrote:Molto bene!

yeah, my actual goal is to write code for image browser resizing when i resize the card

Andy Bertini
Linux: Mint 17.1 Cinnamon - Gambas 3.6.2 - Gridbox 2.99.174 patched
Mac: OSX Yosemite - Livecode Community 7.0
Blog mzSoftware: http://crmforce.netsons.org/myzone
Email: and.bertini@gmail.com
-
Klaus
- Posts: 14177
- Joined: Sat Apr 08, 2006 8:41 am
-
Contact:
Post
by Klaus » Sun Feb 08, 2015 6:44 pm
Okie Dokie, then simply set the browserrect in in your "resizestack" script to the new calcluated size.
Remember that "resizestack" comes with 4 parameters:
on resizestack newWidth,newHeight,oldWidth,oldHeight
So computing the new neccessary rect for the browser shold be no problem.
-
andy60
- Posts: 25
- Joined: Sun Jan 18, 2015 6:51 pm
-
Contact:
Post
by andy60 » Mon Feb 09, 2015 1:54 am
Klaus wrote:Okie Dokie, then simply set the browserrect in in your "resizestack" script to the new calcluated size.
Remember that "resizestack" comes with 4 parameters:
on resizestack newWidth,newHeight,oldWidth,oldHeight
So computing the new neccessary rect for the browser shold be no problem.
Hi, i studied this example
http://lessons.runrev.com/m/4071/l/2384 ... is-resized.
In the card script:
Code: Select all
on resizeStack cardWidth, cardHeight
--graphics and list field
set the width of graphic "rectangle" to cardWidth
set the topleft of graphic "rectangle" to 0,0
set the points of graphic "line" to the bottomleft of graphic "rectangle" & return & the bottomright of graphic "rectangle"
put 0 into listFieldLeft
put the bottom of graphic "rectangle" +1 into listFieldTop
put cardWidth into listFieldright
put cardHeight -14 into listFieldbottom
set the rect of field "list" to listFieldLeft,listFieldTop,listFieldRight,listFieldBottom
--search field and buttons
set the right of button "button 3" to cardWidth - 9
set the right of button "button 2" to the left of button "button 3" - 3
set the right of button "button 1" to the left of button "button 2" - 3
put the topleft of field "search" into savedTopLeft
put the left of button "button 1" - the left of field "search" -3 into theWidth
set the width of field "search" to theWidth
set the topleft of field "search" to savedTopLeft
end resizeStack
With textfield and buttons i have no problem in resizing coding script.
My problem is resize the image object used for browser container.
In both livecode mode (execution or programming) i have difficulties to
manual resize the image. The image seems to be blocked and duplicated.
So i can delete the image e restart my operation. Do you know this problem?
Other consideration on browser:
with edit pointer set to 'on' browser is also active. Why? I can't resize the image field.
Andy Bertini
Linux: Mint 17.1 Cinnamon - Gambas 3.6.2 - Gridbox 2.99.174 patched
Mac: OSX Yosemite - Livecode Community 7.0
Blog mzSoftware: http://crmforce.netsons.org/myzone
Email: and.bertini@gmail.com