| Dart Home | PowerTCP FTP for ActiveX | Custom Development | Reply | PowerTCP FTP for ActiveX Topics | Forums |
| Author | Forum: PowerTCP FTP for ActiveX Topic: Using an instance of Dart.FTP control inside a PB8 user object |
| manta70 From: Borghetto S.S., Italy Posts: 6 Member Since: 04/06/04 |
posted April 6, 2004 1:24 PM Hi everyone, I have created an OLEobject and connected it to the FTP control with the method .ConnectToNewObject("DART.FTP") When I try to fail a login (in order to get an error message) with the following try-catch code block the system message box containing the text "Error calling external object ..." try iole_ftp.Login(as_add, as_login, as_pass, "", 21) CATCH (Exception e6) Messagebox("", "Unexpected exception: " + e6.className() + " (text: " + e6.getMessage() + ")") // runtime error occurred CATCH (RuntimeError e7) Messagebox("", "Runtime error: " + e7.getMessage() ) //FINALLY END TRY Altough my try-catch block avoid the application to crash, I wonder if there is a better method to wrap FTP error from FTP object, avoiding the system error messagebox to appear, maybe without using TRY-catch block Many thanks in advance M |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted April 6, 2004 1:34 PM You are probably getting the error because the object was not really created. The FTP object is licensed and as far as I know cannot be created using ConnectToNewObject. Maybe PB fixed something in PB8, but I am not aware of it. Try putting the FTP control on a form instead of creating it like you are and see what happens. |
| manta70 From: Borghetto S.S., Italy Posts: 6 Member Since: 04/06/04 |
posted April 7, 2004 3:27 AM Hi Tony, thanks a lots for your answer. Since our copy is licenced, it works properly on a form, but I have a last question: "As you know, it is possibile to use FTP object in a PB8 non visual object in any way, by instanciating it instead of placing it on a form? If it possibile, can you please tell me where I can find an example, otherwise, are there other method to use FTP object avoid to use the visual control??" Have a nice day M |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted April 7, 2004 7:32 AM I don't know of a way to do that. In the past I spent a great deal of time searching but was never able to learn anything from other PB users. Sorry. |
| manta70 From: Borghetto S.S., Italy Posts: 6 Member Since: 04/06/04 |
posted April 7, 2004 6:16 PM Thank you anyway ... for the moment, I have decided to give a visual ftpobject as a parameter (type olecustomcontrol) to my non-visual object function. I will keep you informed if I will have a better idea Good bye |
| manta70 From: Borghetto S.S., Italy Posts: 6 Member Since: 04/06/04 |
posted April 19, 2004 9:48 AM A better idea can be inherit a non-visual object from OLEObject or n_oo and place the following code in the constructor event li_ret = this.ConnectToNewObject("DART.FTP") if li_ret < 0 then ... an error occurred In this way in the user defined object one can refer all the method of FTP control in the following way this.store( as_file_name_dest, as_file_name_source) The such generated object can be instanciated and used in another nvo code. The exceptions eventually generated by the FPT control can be caught in the error event of this object Goodbye manta70@libero.it |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted April 19, 2004 10:05 AM This call: li_ret = this.ConnectToNewObject("DART.FTP") Would generate an error on any machine that does not have a development license for the FTP Tool. There are things PowerBuilder does when you insert a control that cause the license to be compiled into the executable. If you late-bind then the license check is not done until run-time. |
| manta70 From: Borghetto S.S., Italy Posts: 6 Member Since: 04/06/04 |
posted April 20, 2004 6:22 PM Hi Tony, first of all, thank you again for your support. I do not understand your last message, since last week I compiled a .exe with PB8 and copied it on a machine where I had previously installed the DART.FTP dlls and, as I remember now, it seemed work without any message box appearing. Of course we have licencend a copy on the PC we use for development and compiling, but now we wonder if we will have some problem (after the end on the 30 days trial period of the control) on the two machines where we about to install the same .exe which contains the FTP object Thanks a lot Mauro |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted April 20, 2004 7:05 PM You will get an error unless you have a license on the machine. You can try copying your license to all of your targets to see if that works. Follow the directions in the Online Help for "Distribution under Internet Information Server" |
| manta70 From: Borghetto S.S., Italy Posts: 6 Member Since: 04/06/04 |
posted May 27, 2004 10:48 AM We have followed your instruction on our develop machine and our two production machines are working from the 26 of April (more than 30 days ago). Thank you very much |
| eric_brubakken eric.brubakken@shawinc.com From: Dalton, GA USA Posts: 2 Member Since: 09/22/04 |
posted September 22, 2004 6:01 PM You will get an error unless you have a license on the machine. You can try copying your license to all of your targets to see if that works. Follow the directions in the Online Help for "Distribution under Internet Information Server" I have searched for "Distribution under Internet Information Server" and have not been able to find this reference. Does this still exist in the Online Help? Thanks Eric |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted September 22, 2004 7:08 PM What product are you using? What is the name of the Help file? |
| eric_brubakken eric.brubakken@shawinc.com From: Dalton, GA USA Posts: 2 Member Since: 09/22/04 |
posted September 23, 2004 8:08 AM "Distribution under Internet Information Server" We are using PB 8.0. From the way the post was written I was looking for that information on your web page. Thanks |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted September 23, 2004 8:42 AM I meant which product of ours are you using. You should be able to find it in the Online help that got installed. |
| Reply | PowerTCP FTP for ActiveX Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|