?
Solved

Filextra3 or Buddy API

Posted on 2003-02-23
4
Medium Priority
?
660 Views
Last Modified: 2013-12-24
Ok, I am having trouble as I port my windows project to the Mac because of Buddy API and File3Xtra. The problem lies in that I am using Buddy API to save the jpegs from the graphics folder, giving the user a choice as to where they would like to save them. I am using this script on windows

on mouseUp me
 file = baGetFilename( "save", baSysFolder( "desktop" ), "pic1.Jpg", "JPGfiles|*.jpg", 524288, "Save file", false, 0, 0 )
if file <> "" then
baCopyFile( the moviePath & "graphics\billedee.jpg", file, "always" )
 end if
end
Now it works fine on windows but not on the Mac. Can someone help me? I've tried everything. I ran into the same problem with File3Xtra I ammusing this script

on mouseUp me

filenam = "rejoice.mp3"
filesource = the moviePath & "Music\" & filenam

fxObj = xtra("FileXtra3").new()
destination = fxObj.fx_FileSaveAsDialog("c:\", filenam, "Save File...", True)


fxfile = xtra("FileXtra3").new()
put fxfile.fx_FileCopy(filesource, destination)

fxfile = 0
fxfObj = 0

end
Here I am trying to save an mp3. I'll really appreciate help here as the project must go multi platform.
0
Comment
Question by:sincejan63
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 4

Accepted Solution

by:
nax earned 60 total points
ID: 8006034
One thing could be causing problems is the path's separator

"/" or "\" only works on a PC and ":" is for the Mac so to make sure that your script works for both, use the machineType to check the machine and change the separator accordingly:

---
global pathSep

on startmovie
   pathSep = [":", "\"][(the machineType = 256)+1]
end
---

and use this for every instance that you use a separator, like in the following:

---
baCopyFile( the moviePath & "graphics" & pathSep & "billedee.jpg", file, "always" )
---

and also in:

---
filesource = the moviePath & "Music" & pathSep & filenam
---

be sure to specify pathSep variable in your global declaration for each script that you use it.  Don't use "c:\" as a way to start your default path.  use buddyAPI or fileXtra3 methods to check the actual drive and pathname of the local hard drives.

hope that helps
0
 

Author Comment

by:sincejan63
ID: 8006913
It's still not working, okay I give up on the mac part of FileXtra, if these Xtra writers does not have the commonsense to include the mac codes for their xtra, I have no choice so I'll go with buddy API. All I want to do is to modify my current behavoir I am using with the buddy API xtra to work on the mac. I have been trying to get this answer since November of last year and no one seems to understand. I am getting frustrated here. It's bussy API on the Mac Nax, on the Mac. I am using this script on the PC
on mouseUp me
  file = baGetFilename( "save", baSysFolder( "desktop" ), "pic1.Jpg", "JPGfiles|*.jpg", 524288, "Save file", false, 0, 0 )
 if file <> "" then
 baCopyFile( the moviePath & "graphics\billedee.jpg", file, "always" )
  end if
end

What do I have to do to give the user an option to save the file????
0
 
LVL 4

Expert Comment

by:nax
ID: 8006984
what kind of errors did you get?  

I don't have problems with cross platform pojects as long as you use the right Xtras and the right methods -- we do that all the time.  fileXtra4 has Mac Version -- buddyAPI has also Mac version but with some differences in features.
0
 

Author Comment

by:sincejan63
ID: 8022700
well I had to email the makers and they provided me with  the correct script, Thank anyway.
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When deciding to adopt any help desk solutions many factors should be explored before taking decisions. This will change from business to another but in general there are some kind of rule of thumb. Here are some quick tips: Do we need only ticket…
In this short web based tutorial, I wanted to show users how they can still use the powers of FrontPage in conjunction with Expression Web 3.  Even though Microsoft eliminated the use of Web components, we can still use them with FrontPage and edit …
The purpose of this video is to demonstrate how to add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question