deleting Macintel desktop aliases

2006-09-04 Thread Shari

The good news: it will work the good ol' MC way ;-)
...
  if there is a folder theFile then
delete theFile
  end if
...


Apparently Macintel desktop aliases are cranky buggers to delete.  I 
have tried every combo I can think of in MC.


delete folder theFile # if there is a folder theFile
delete file theFile # if there is a file theFile
delete theFile # if there is a folder theFile, if there is a file theFile

The only thing that had worked is the revDeleteFolder, and apparently 
it doesn't work in MC or an MC standalone.  It worked perfectly in 
Rev.


As for revXXX things... I still do not understand.  The engine is the 
same regardless, right?  The only difference between Rev 2.7 and MC 
2.7 is the IDE, the user interface.  So there must be libraries or 
stacks that contain the special revXXX items, that I could add to my 
stack to make them work?


Shari
--
Gypsy King Software
Mac and Windows shareware games
http://www.gypsyware.com
___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: deleting Macintel desktop aliases

2006-09-04 Thread Ken Ray
On 9/4/06 5:26 PM, Shari [EMAIL PROTECTED] wrote:


 As for revXXX things... I still do not understand.  The engine is the
 same regardless, right?  The only difference between Rev 2.7 and MC
 2.7 is the IDE, the user interface.  So there must be libraries or
 stacks that contain the special revXXX items, that I could add to my
 stack to make them work?

Yes, there are rev libraries you could work with (revDeleteFolder is in the
script of btn RevCommon of group RevLibraries of the first card of the
stack file revlibrary.rev in the Toolset folder) , or you could copy the
code you need from the Rev library (for example, 'revDeleteFolder' is in the
revCommon backscript (open the message box in Rev, click on the Backscripts
button).

Alternatively you could try my stsDeleteFolder command (plus the
stsFormatPath function if you need Windows functionality) to see if that
works for you:

on stsDeleteFolder pFolder
  -- WARNING: THIS DELETES A FOLDER AND ALL THE FILES IT CONTAINS... USE
WITH CAUTION!
  switch (the platform)
  case MacOS
if isOSX() then
  get shell(rm -rf  q(pFolder))
else
  -- TBD for OS 9
end if
break
  case Win32
if char 1 of word 2 of the systemVersion = 5 then
  get shell (rmdir /s /q  q(stsFormatPath(pFolder,Win32)))
else
  get shell (deltree /Y  q(stsFormatPath(pFolder,Win32)))
end if
break
  end switch
end stsDeleteFolder

function q pWhat
  return quote  pWhat  quote
end q

function isOSX
  set the itemDel to .
  return (item 1 of the systemVersion =10)
end isOSX 

function stsFormatPath pPath,pPlatform
  -- assumes a full /-delimited path
  switch pPlatform
  case MacOSX
  case Unix
put \  space  quote  '`!;()[]?#$^*= into tSpecialChars
repeat for each char tChar in tSpecialChars
  replace tChar with (\  tChar) in pPath
end repeat
break
  case Win32
set the itemDel to /
put item -1 of pPath into tFile
put \/:*?  quote  | into tSpecialChars
repeat for each char tChar in tSpecialChars
  replace tChar with (-) in tFile
end repeat
put tFile into item -1 of pPath
replace / with \ in pPath
break
  end switch
  return pPath
end stsFormatPath


Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: [EMAIL PROTECTED]


___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: deleting Macintel desktop aliases

2006-09-04 Thread Shari

Yes, there are rev libraries you could work with (revDeleteFolder is in the
script of btn RevCommon of group RevLibraries of the first card of the
stack file revlibrary.rev in the Toolset folder) , or you could copy the
code you need from the Rev library (for example, 'revDeleteFolder' is in the
revCommon backscript (open the message box in Rev, click on the Backscripts
button).


Ken,

I am definitely going to try your stsDeleteFolder solution first :-)

But I do have another question about these special revThings.  Or 
maybe just an observation.  Similar to needing the libUrl stack if 
there are any internet type handlers, if there are any revXXX 
functions, special stacks will always need to be included in the 
build.


Is this correct?

Shari
--
Gypsy King Software
Mac and Windows shareware games
http://www.gypsyware.com
___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: deleting Macintel desktop aliases

2006-09-04 Thread Shari

Ken,

Your stsDeleteFolder works perfectly!  Thank you!  I think that is 
the last piece for making things happy on Macintel.  Gee, I feel like 
I just went thru this for OSX...  doesn't seem that long ago.


I don't suppose you could recommend a book or manual that gives an 
easy to understand listing of the shell commands available for OSX? 
I know I've got others in the code that folks have shared.  They seem 
to be pretty useful entities.  I know that my createAlias handler 
uses them... Now the deleteAlias handler will, too :-D


Question:  What does sts stand for?

Shari
--
Gypsy King Software
Mac and Windows shareware games
http://www.gypsyware.com
___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: deleting Macintel desktop aliases

2006-09-04 Thread J. Landman Gay

Shari wrote:

As for revXXX things... I still do not understand.  The engine is the 
same regardless, right?  The only difference between Rev 2.7 and MC 2.7 
is the IDE, the user interface.  So there must be libraries or stacks 
that contain the special revXXX items, that I could add to my stack to 
make them work?


All commands starting with rev are part of a set of libraries that are 
embedded in the Revolution IDE. They will all work fine in the IDE, as 
you found, but you must include those libraries when you build a 
standalone. If you tell the standalone builder to include the libraries, 
it puts them in during the build process.


One of the things the SB looks for when it does an auto-scan for 
resources are any of those rev commands. If you have turned off 
search for inclusions and are doing inclusions manually, then you need 
to specify in the standalone settings which libraries you want included.


The revDeleteFolder command is in the common library, and I believe that 
one always gets included in all standalones (you don't have to specially 
indicate it, and it isn't in the SB inclusion list.) But you do have to 
use the Rev standalone builder to get it into the standalone.



--
Jacqueline Landman Gay | [EMAIL PROTECTED]
HyperActive Software   | http://www.hyperactivesw.com
___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: deleting Macintel desktop aliases

2006-09-04 Thread Ken Ray
On 9/4/06 9:39 PM, Shari [EMAIL PROTECTED] wrote:

 Question:  What does sts stand for?

Sons of Thunder Software

:-)

Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: [EMAIL PROTECTED]

___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: deleting Macintel desktop aliases

2006-09-04 Thread J. Landman Gay

Shari wrote:

But I do have another question about these special revThings.  Or maybe 
just an observation.  Similar to needing the libUrl stack if there are 
any internet type handlers, if there are any revXXX functions, special 
stacks will always need to be included in the build.


Is this correct?


The Rev documentation usually indicates at the bottom of each rev 
command which library it requires. You can check there. The libraries 
are not stored in the IDE in stacks; usually they're in buttons.


As Ken pointed out, you can go digging and find the scripts but it is 
far easier to just use the standalone builder interface. You didn't say 
why you couldn't build using that, but if you still have embedded 
ask/answer dialogs in your stacks, I'm betting that's the reason.


--
Jacqueline Landman Gay | [EMAIL PROTECTED]
HyperActive Software   | http://www.hyperactivesw.com
___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: deleting Macintel desktop aliases

2006-09-04 Thread Ken Ray
On 9/4/06 9:57 PM, J. Landman Gay [EMAIL PROTECTED] wrote:

 As Ken pointed out, you can go digging and find the scripts but it is
 far easier to just use the standalone builder interface.

For some things, perhaps, but there's too many idiosyncracies with Rev's
standalone builder that make it annoying for me to use (things like having
to close and reopen the stack I'm building a standalone out of, the
inability to build a standalone in the same location as your source file so
you can easily test your app, etc.)

I find MC's standalone builder much cleaner for this kind of thing - but if
one wants to bundle in Rev libraries, it is much easier to do that with the
Rev standalone builder.

To each their own!

Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: [EMAIL PROTECTED]

___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: deleting Macintel desktop aliases

2006-09-04 Thread Shari

  Question:  What does sts stand for?

Sons of Thunder Software

:-)

Ken Ray
Sons of Thunder Software


Oh... NOW I feel silly!  LOL!

:-D
--
Gypsy King Software
Mac and Windows shareware games
http://www.gypsyware.com
___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: deleting Macintel desktop aliases

2006-09-04 Thread Shari
As Ken pointed out, you can go digging and find the scripts but it 
is far easier to just use the standalone builder interface. You 
didn't say why you couldn't build using that, but if you still have 
embedded ask/answer dialogs in your stacks, I'm betting that's the 
reason.


Jacque,

You are correct.  I hope it was a big bet :-)

I'm about two years behind schedule with the adventure game.  I've 
diverted a lot of time to updates of existing projects, and new small 
projects.  My New Year's Resolution last year was to devote 95% of 
2006 to the adventure game.  Guess what didn't happen?  I spent 95% 
of 2006 updating existing projects.  So... the existing projects 
aren't going to get dissected again unless it's to squash bugs :-) 
not IDE related bugs...  :-)


If it ain't broke...

Shari

--
Gypsy King Software
Mac and Windows shareware games
http://www.gypsyware.com
___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard