Problem for open a standalone from a CdRom
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Problem for open a standalone from a CdRom
Hi All,
I have a standalone for Mac
It work well when i open it from my hardDisk and also from an usbkey
But not directly from a CdRom
(if i copy it from de CDRom to my HardKisk it work)
There is no write at open, preopenstack, opencard, preopencard
Thank in advance for your lights
Jean-Marc
I have a standalone for Mac
It work well when i open it from my hardDisk and also from an usbkey
But not directly from a CdRom
(if i copy it from de CDRom to my HardKisk it work)
There is no write at open, preopenstack, opencard, preopencard
Thank in advance for your lights
Jean-Marc
https://alternatic.ch
Re: Problem for open a standalone from a CdRom
Jean-Marc,
What happens when you try to start the app from the CD-Rom?
Kind regards,
Mark
What happens when you try to start the app from the CD-Rom?
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: Problem for open a standalone from a CdRom
Hi Mark,
Thank for your reply
I tried with a bug report and it return that
Type
Object card id 1002
Line put "Object" & tab & the short name of tObject & cr after tErrorString
Hint preOpenCard
I search, search... and i'll come back
Best regards
Jean-Marc
Thank for your reply
Il can open it but it stop working after the first cd of the mainstack is openedWhat happens when you try to start the app from the CD-Rom?
I tried with a bug report and it return that
Type
Object card id 1002
Line put "Object" & tab & the short name of tObject & cr after tErrorString
Hint preOpenCard
I search, search... and i'll come back
Best regards
Jean-Marc
https://alternatic.ch
Re: Problem for open a standalone from a CdRom
Hi Jean-Marc,
I suspect that the line
put "Object" & tab & the short name of tObject & cr after tErrorString
isn't yours. Can you confirm that? Do you always include the bug reporting feature? If yes, turn it off. If no, can you give me a list of libraries that you use?
If the line is actually yours, can you post the script containing that line and can you figure out what's in the variable tObject? I think that tObject contains an absolute path to an object, which might cause a problem when the drive name or folder path changes.
Best,
Mark
I suspect that the line
put "Object" & tab & the short name of tObject & cr after tErrorString
isn't yours. Can you confirm that? Do you always include the bug reporting feature? If yes, turn it off. If no, can you give me a list of libraries that you use?
If the line is actually yours, can you post the script containing that line and can you figure out what's in the variable tObject? I think that tObject contains an absolute path to an object, which might cause a problem when the drive name or folder path changes.
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: Problem for open a standalone from a CdRom
Hi Mark,
Font Support, Geometry, Internet,Printing,Speech
Best and thank again
Jean-Marc
yesisn't yours. Can you confirm that?
No and the list of libraries i use :Do you always include the bug reporting feature? If yes, turn it off. If no, can you give me a list of libraries that you use?
Font Support, Geometry, Internet,Printing,Speech
Best and thank again
Jean-Marc
https://alternatic.ch
Re: Problem for open a standalone from a CdRom
Jean-marc,
What happens if you don't include the geometry library? You'll need to remove all calls to the geometry library of course and you probably need to remove all geometry settings from all objects. There is a good chance that this is the source of the problem.
Kind regards,
Mark
What happens if you don't include the geometry library? You'll need to remove all calls to the geometry library of course and you probably need to remove all geometry settings from all objects. There is a good chance that this is the source of the problem.
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: Problem for open a standalone from a CdRom
Hi Mark,
Same result without the geometry librairy
In my first message i said there is no write.It is correct, but i have a read from file
and If i suppress it the Cd-Rom work fine.
Of course i can suppress it, but i don't understand why it does problem.
I think the path of the folder which contains the file is correct.
This script build it :
Best
Jean-Marc
Same result without the geometry librairy
In my first message i said there is no write.It is correct, but i have a read from file
and If i suppress it the Cd-Rom work fine.
Of course i can suppress it, but i don't understand why it does problem.
I think the path of the folder which contains the file is correct.
This script build it :
Code: Select all
on FaitPathNec
global gPathNec
put the filename of this stack into bufPath
put bufPath into gPathNec
put the environment into pEnv
put the itemdel into OID
set the itemdel to "/"
put the num of items of gPathNec into nbF
if the platform = "MacOS" then
if pEnv = "standalone application" then
delete item (nbF-3) to nbf of gPathNec
end if
if pEnv = "development" then
delete last item of gPathNec
end if
else
delete last item of gPathNec
end if
set the itemdel to OID
put "/"&"LeNecessaire" after gPathNec
end FaitPathNec
Jean-Marc
https://alternatic.ch
Re: Problem for open a standalone from a CdRom
Jean-Marc,
Can you post your preOpenCard script?
Mark
Can you post your preOpenCard script?
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: Problem for open a standalone from a CdRom
Hi Mark,
I solved the problem with a file in a folder of the Preferences folder of the user
I promess i modify same "repeat with"
Best
Jean-Marc
I solved the problem with a file in a folder of the Preferences folder of the user
Yes of course, the propencard handler and the linked handlersCan you post your preOpenCard script?
Code: Select all
on preopencard
global gLaCurCD,gdev
put the short name of this cd into gLaCurCD
if the MonModeNav of this stack = "AvBalai" then
show group "grChgDelai"
else
hide group "grChgDelai"
end if
ajusteBtnModeNav
ajustLesParleur
placeSlider
AjusteLesDeja
set the top of grc "Entoure" to 4000
end preopencard
on ajusteBtnModeNav
put the MonModeNav of this stack into bufMN
if bufMN = "AvSouris" then
put "bSouris" into bufNombtn
end if
if bufMN = "AvClavAl" then
put "bDeuxC" into bufNombtn
end if
if bufMN = "AvBalai" then
put "bunC" into bufNombtn
end if
ajusteModeNav bufNombtn
end ajusteBtnModeNav
on ajusteModeNav n --•• afficher le modenav
put n into MonNom
put "bSouris,bUnC,bDeuxC" into LesB
put the num of items of LesB into nb
repeat with i = 1 to nb
put item i of LesB into UnB
if UnB = MonNom then
set the hilite of btn UnB to true
next repeat
end if
set the hilite of btn UnB to false
end repeat
if MonNom = "bunC" then
set the MonModeNav of this stack to "AvBalai"
set the blendlevel of img "iPasser" to 0
end if
if MonNom = "bDeuxC" then
set the MonModeNav of this stack to "AvClavAl"
set the blendlevel of img "iPasser" to 0
end if
if MonNom = "bSouris" then
set the MonModeNav of this stack to "AvSouris"
set the loc of grc "Entoure" to 4000,4000
set the blendlevel of img "iPasser" to 100
end if
end ajusteModeNav
on ajustLesParleur
put the MaSynthVoc of this stack into bufMP
put the MonParleurTexte of this stack into bufMPtexte
put the MonParleurInfos of this stack into bufMPinfos
set the hilite of btn "bParleurTexte" to bufMPtexte
set the hilite of btn "bParleurInfos" to bufMPinfos
if bufMP then
EnaLesParleur
else
DisLesparleur
end if
end ajustLesParleur
on EnaLesParleur
set the MaSynthVoc of this stack to true
put "bParleurTexte,bParleurInfos" into LesP
repeat with i = 1 to the num of items of Lesp
put item i of LesP into UnP
set the blendlevel of btn UnP to 0
enable btn UnP
end repeat
revloadSpeech
end EnaLesParleur
on DisLesparleur
set the MaSynthVoc of this stack to false
set the MonParleurTexte of this stack to false
set the MonParleurInfos of this stack to false
put "bParleurTexte,bParleurInfos" into LesP
repeat with i = 1 to the num of items of Lesp
put item i of LesP into UnP
set the blendlevel of btn UnP to 75
disable btn UnP
end repeat
revUnloadSpeech
end DisLesparleur
on PlaceSlider
put the left of grc "HsliderbarG" into MinL
put the defdelai of this stack into UnDelai
put item 1 of UnDelai into LaLeft
set the left of grc "LeSlider" to laLeft+MinL
put item 3 of UnDelai into EnSec
put Ensec&&"sec." into fld "theValue_h"
put the loc of fld "theValue_h" into LocF
put the loc of grc "LeSlider" into LocS
put item 1 of LocS into item 1 of LocF
set the loc of fld "theValue_h" to LocF
end PlaceSlider
on AjusteLesDeja
global gMesDejaVus
repeat with i = 1 to 10
put "deja"&i into Undeja
if line i of gMesDejaVus <> 0 then
show btn Undeja
if line i of gMesDejaVus = 2 then
PlaceLesSouris i
end if
else
hide btn Undeja
end if
end repeat
end AjusteLesDeja

Best
Jean-Marc
https://alternatic.ch
Re: Problem for open a standalone from a CdRom
Hi Jean-Marc,
Let's start with modifying the preOpenCard handler.
Do you see an error if you run this from CD? Can you make a screenshot of the error and post it?
You also might want to change the ajusteBtnModeNav handler to make sure that no unnecesary errors occur:
Best,
Mark
Let's start with modifying the preOpenCard handler.
Code: Select all
on preopencard
try
global gLaCurCD,gdev
put the short name of this cd into gLaCurCD
if the MonModeNav of this stack = "AvBalai" then
show group "grChgDelai"
else
hide group "grChgDelai"
end if
ajusteBtnModeNav
ajustLesParleur
placeSlider
AjusteLesDeja
set the top of grc "Entoure" to 4000
catch myErr
answer myErr
end try
end preopencard
You also might want to change the ajusteBtnModeNav handler to make sure that no unnecesary errors occur:
Code: Select all
on ajusteBtnModeNav
put the MonModeNav of this stack into bufMN
if bufMN = "AvSouris" then
put "bSouris" into bufNombtn
else if bufMN = "AvClavAl" then
put "bDeuxC" into bufNombtn
else if bufMN = "AvBalai" then
put "bunC" into bufNombtn
else
put empty into bufNombtn
end if
if bufNombtn is not empty then
ajusteModeNav bufNombtn
else
beep
answer error "bubNomBtn is empty"
end if
end ajusteBtnModeNav
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: Problem for open a standalone from a CdRom
Hi Mark,
Thank a lot for your lights
I resume :
This standalone work fine from the HD and from an usbKey.
From CD it stop working
1. The bug report said the error is in the preopencard
2. After i suppress a "read from file" at preopenstack, the problem disappear (the file is now in the preference folder of the user)
In this case it is ok but why the standalone can't read a file from the CD-Rom (the path is correct)
I have an handler "verifVocal" (to verify if there is a vocal synthesis) at preopenstack
Maeby it is the start of the problem
Best
Jean-Marc
Thank a lot for your lights
No error with new standalone with the news preopencard and ajusteBtnModeNav (no answer dialog, no bug report)Do you see an error if you run this from CD?
I resume :
This standalone work fine from the HD and from an usbKey.
From CD it stop working
1. The bug report said the error is in the preopencard
2. After i suppress a "read from file" at preopenstack, the problem disappear (the file is now in the preference folder of the user)
In this case it is ok but why the standalone can't read a file from the CD-Rom (the path is correct)
I have an handler "verifVocal" (to verify if there is a vocal synthesis) at preopenstack
Maeby it is the start of the problem
Code: Select all
on verifVocal --•• verif présence synthese vocale
put revGetSpeechVolume() into oldVolVS
revSetSpeechVolume 0
put "Juste un test" into bufT
try
revSpeak bufT
wait until revIsSpeaking() is false
catch theError
end try
if theError = empty then
EnaLesParleur --•• enable btn Parleurs
else
DisLesparleur --•• disable btn Parleurs
end if
revSetSpeechVolume oldVolVS
-- dansmes theError
end verifVocal
Jean-Marc
https://alternatic.ch
Re: Problem for open a standalone from a CdRom
Hi Jean-Marc,
Try to use the URL syntax, since "open file..." will really try to open a file but it is
WRITE PROTECTED on the CD,so this might throw the error!?
...
put url "file:file.txt" into tFileContent
...
Best
Klaus
AHA! You did not tell about this one!jmburnod wrote:...
2. After i suppress a "read from file" at preopenstack, the problem disappear (the file is now in the preference folder of the user)
Try to use the URL syntax, since "open file..." will really try to open a file but it is
WRITE PROTECTED on the CD,so this might throw the error!?
...
put url "file:file.txt" into tFileContent
...
Best
Klaus
Re: Problem for open a standalone from a CdRom
Hi Jean-Marc,
I'm a little confused. If you don't get any error message with my modified script, assuming that you included the answer dialog in your standalone, I'd say that the problem is solved? Am I wrong?
Mark
I'm a little confused. If you don't get any error message with my modified script, assuming that you included the answer dialog in your standalone, I'd say that the problem is solved? Am I wrong?
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: Problem for open a standalone from a CdRom
Klaus,
I really can't imagine that files can't be opened the old-fashioned way on a write-protected volume. If this is true, then it is a LiveCode bug, unless "open file x for read" still works.
Best,
Mark
I really can't imagine that files can't be opened the old-fashioned way on a write-protected volume. If this is true, then it is a LiveCode bug, unless "open file x for read" still works.
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: Problem for open a standalone from a CdRom
Hi Mark and Klaus
Mark said :
Klaus said :
The bug report of the standalone return the error is at preopencard
I want understand why a modification in the preopenstack script solving an error at preopencard
Best
Jean-Marc
Mark said :
Yes. After i suppress the "read from file" at propenstack and i don't undertand why.I'd say that the problem is solved?
Klaus said :
For me it is possible to read a file from a locked volume at preopenstackAHA! You did not tell about this one!

The bug report of the standalone return the error is at preopencard
I want understand why a modification in the preopenstack script solving an error at preopencard
Best
Jean-Marc
https://alternatic.ch