My simple application will login at start to the serwer (via curl) and get a html file for parsing.
How attach startup panel at start the application?
on will finish launching
tell window "MainWindow"
display panel window "LoginWindow" attached to window "MainWindow"
end tell
end will finish launching
on clicked theObject
if name of theObject is "GoLogin" then
display panel window "LoginWindow" attached to window "MainWindow"
end if
end clicked
When I press the button “GoLogin”, panel works OK. But at startup - no.
on awake from nib theObject
display panel window "LoginWindow" attached to window "MainWindow"
end awake from nib
on clicked theObject
if name of theObject is "GoLogin" then
display panel window "LoginWindow" attached to window "MainWindow"
end if
end clicked
I would use the awake from nib and without the tell block. That’s how I did it.
What I would also add is the “panel ended” thing. Could get a bit messy without it