Page 1 of 1

Some initial questions; openCard, project browser etc

Posted: Thu Apr 30, 2015 6:39 am
by julgus
Hi,
first post!
I have put some code in my card script, on openCard. This code isn't run in editor mode but when I build a standalone it is. Why?
I managed to run it using send card message in edit mode but then Livecode hung and I was forced to quit it and restart.
I restarted but after a while my very simple app stopped to work, no scripts whatsoever executed? However it worked fine as a standalone app...

I am working with the project browser:
Adding cards and objects into these card... suddenly it says that "The control you select no longer exists", but it does - after a while I can access it but then it says that some other control is missing

Why is the script executed when I click on a control in the project browser - in edit mode?

I can't say that I'm impressed so far... but I can be wrong pls help me - what am I doing wrong?

What am I doing wrong?
Regards
Johan, Sweden

Re: openCard - message not fired?

Posted: Thu Apr 30, 2015 7:56 am
by Dixie
Post your openCard script...

Re: openCard - message not fired?

Posted: Thu Apr 30, 2015 8:03 am
by julgus

Code: Select all

on openCard
   answer "Hej"
end openCard
When in edit mode it isn't working, but when stand alone it is...

Re: Some initial questions; openCard, project browser etc

Posted: Thu Apr 30, 2015 8:25 am
by Dixie
mmm... that works for me in the IDE and as a standalone..:-( Don't know what to suggest

Re: Some initial questions; openCard, project browser etc

Posted: Thu Apr 30, 2015 8:33 am
by julgus
I have seen the opposite when searching this forum; it works in edit mode but not in the standalone app...
I have now solved the issue with project browser.. it happens if you click on the row where it says card:card and then click on an control that belongs to that card. :?

I am using LC on a Mac. Is this common?

Re: Some initial questions; openCard, project browser etc

Posted: Thu Apr 30, 2015 10:22 am
by julgus
As you can see the project browser contains 3 card of which I only can access 2 of them... the one with the rectangle reports an error when trying to access it..

Re: Some initial questions; openCard, project browser etc

Posted: Thu Apr 30, 2015 11:58 am
by julgus
Ok, I have now installed it on a Win 8 computer. Exactly the same result in a new project. Project browser issues (same stupid errors "Missing controls") and no card script execute when on cardopen.....

Pls note that in the example above I no longer can access the card, it exists in the browser, but is gone... pls tell me how to access the card without using project browser...

Have a look at attached file...

My app contains card 1007, 10042, 1042 where 1007 contains several controls. When double click on 1007 a card 1047 is shown... what? Don't belong to this app - where did it come from?

Re: Some initial questions; openCard, project browser etc

Posted: Thu Apr 30, 2015 12:21 pm
by julgus
I have submitted this thread to LC support. Is this behaviour expected, am I an idiot, having bad luck, is LC not meant to be a tool for me... :shock:

Re: Some initial questions; openCard, project browser etc

Posted: Thu Apr 30, 2015 12:37 pm
by julgus
Cant reproduce the errors in project browser in 8 DP1, however cardOpen don't fire... and when trying to build a stand alone it ends in a loop of some kind... ok, trying with 8 DP2.. manages to generate a standalone app but it quits before it starts to execute... back to 7.0.4 then...

Re: Some initial questions; openCard, project browser etc

Posted: Thu Apr 30, 2015 4:49 pm
by jacque
Most scripts won't run in edit mode. Be sure the browse tool is selected before testing your stack.

The opencard message will only fire when you leave the card and then come back. Go to another card and then return and you will see it. Closing the stack and reopening it probably won't cause an opencard message if you are using the default stack settings.

Re: Some initial questions; openCard, project browser etc

Posted: Thu Apr 30, 2015 10:18 pm
by julgus
No, it won't fire even if I return.

Re: Some initial questions; openCard, project browser etc

Posted: Thu Apr 30, 2015 10:42 pm
by Simon
Hi julgus,
8.x is still in Developer Preview (read buggy as all heck!)
As I see you currently only have 8 posts I take it you are new to liveCode? Unless you really want to play with widgets stick with 7.x versions for now.

Simon