Re: [udk-dev] Addon with modal dialog
Andreas, I guess dev@api.openoffice.org is a better mailing list for this question. Please try and repost there. -Stephan Andreas Saeger wrote: I use the Addons.xcu provided at http://wiki.services.openoffice.org/wiki/UNO_component_packaging without node oor:name=Images and replaced the python-class with my own one: import uno import unohelper import string from com.sun.star.task import XJobExecutor class Wavelet( unohelper.Base, XJobExecutor ): cnt = 0 def __init__( self, ctx ): Wavelet.cnt +=1 self.ctx = ctx def __del__(self): Wavelet.cnt -=1 def trigger( self, args ): Dlg = self.ctx.ServiceManager.createInstance(com.sun.star.awt.UnoControlDialog) M = self.ctx.ServiceManager.createInstance(com.sun.star.awt.UnoControlDialogModel) M.Title = args.__repr__() +' '+ str(Wavelet.cnt) +'' Dlg.setModel(M) Dlg.setVisible(True) Dlg.execute() g_ImplementationHelper = unohelper.ImplementationHelper() g_ImplementationHelper.addImplementation( Wavelet, name.vojta.openoffice.Wavelet, (com.sun.star.task.Job,),) It executes a most simple awt-dialog, showing a reference-counter and the content of the trigger's second param args in the title. (could not imagine which args are passed. It's the param execute of the control's URL service:name.vojta.openoffice.Wavelet?execute) After installation with package manager of OOo2.0.2(Linux) I can open a series of new writer docs, call the modal dialog from unnamed1, another instance from unnamed2,... After closing one dialog I can access the respective document-view again. Everything works as expected, BUT: All instances of the dialogs are stacked. I can access the last opened dialog only. Another python-addon oooblogger behaves likewise. Calc's C++ solver is non-modal and I guess it uses awt.TopWindow rather than UnoControlDialog. I translated some working basic-code to python because I wanted an object orientated implementation. It includes dialog-classes for selection and navigation across different types of spreadsheet-cells. Because my dialogs start with some user-selection and perform selection and scolling within the current controller they should be modal in respect to the current controller, but they should allow parallel inspection of two views as well. So they should not be modal in respect to each other. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [udk-dev] Scope snd syntax for Basic UDT's
Hi, sorry for reposting the same question, but I really need help. If this is the wrong ML, please point me to the right one. Thanks in advance for any information Paolo Mantovani Alle 16:06, lunedì 2 ottobre 2006, Paolo Mantovani ha scritto: Hi all, I can't found any specifications for the use of basic udt's, a part from a small example in the OOBasic guide. But perhaps there could be some recent documentation that I'm not aware. Anyway I'm looking for the following information: - Can I declare a type into an external library? - Can I use public/private keywords in order to affect the UDT scope? example Private Type MyUDT .. ... End Type - can I use an UDT as a result type for a basic function? example: Type MyUDT .. End Type Function Test() as MyUDT End Function - Can I use an UDT as a parameter type into a basic sub or function? example: sub Test( myParam As MyUDT ) ... End Sub - Can I use Basic UDT's as parameters for Windows API's as it usually happens in VB/VBA ? (guess no) - Can I declare an array as an UDT's member ? example Type MyUDT MyList(4) As Long ... - Can I declare a fixed lenght string as an UDT's member ? Type MyUDT MyFixedString As String*6 ... Thank you very much for any information Paolo Mantovani - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [udk-dev] Addon with modal dialog
Hi M.Title = args.__repr__() +' '+ str(Wavelet.cnt) +'' Dlg.setModel(M) Dlg.setVisible(True) Dlg.execute() try commenting the Dlg.execute() Laurent -- Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - http://www.indesko.com Nuxeo Enterprise Content Management http://www.nuxeo.com - http://www.nuxeo.org Livre Programmation OpenOffice.org, Eyrolles 2004-2006 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [udk-dev] Scope snd syntax for Basic UDT's
Hi Paolo, sorry for reposting the same question, but I really need help. If this is the wrong ML, please point me to the right one. sorry for not answering earlier :-) I can't found any specifications for the use of basic udt's, a part from a small example in the OOBasic guide. udt's were a completely missing feature. Now - I don't remember since which version - they are available but the implementation is not complete yet. Unfortunately the remaining problems are not so easy to solve. But perhaps there could be some recent documentation that I'm not aware. Anyway I'm looking for the following information: - Can I declare a type into an external library? I've just tried it in a m184 and it did not work. - Can I use public/private keywords in order to affect the UDT scope? No, this also does not work yet - Can I use an UDT as a parameter type into a basic sub or function? example: sub Test( myParam As MyUDT ) Yes - Can I use Basic UDT's as parameters for Windows API's as it usually happens in VB/VBA ? (guess no) How do you want to access the Windows API? Via DLL call? This indeed does not support udt's. - Can I declare an array as an UDT's member ? example Type MyUDT MyList(4) As Long No. This is handled by an internal issue, but it's set to OOo later currently. - Can I declare a fixed lenght string as an UDT's member ? Type MyUDT MyFixedString As String*6 ... Yes, but I'm not sure if this has any effect So this feature is rather incomplete. Sorry to have no better news. Regards Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[udk-dev] Re: Scope snd syntax for Basic UDT's
Paolo Mantovani wrote: Hi, sorry for reposting the same question, but I really need help. If this is the wrong ML, please point me to the right one. Thanks in advance for any information Paolo Mantovani Alle 16:06, lunedì 2 ottobre 2006, Paolo Mantovani ha scritto: Hi all, I can't found any specifications for the use of basic udt's, a part from a small example in the OOBasic guide. But perhaps there could be some recent documentation that I'm not aware. Anyway I'm looking for the following information: - Can I declare a type into an external library? A userdefined datatype is valid on module level only (implicitly private). You can implement functions like myLib.moduleUDT.getNewUDT() or myLib.moduleUDT.makeUDT(Obj,sName,oListener,iCount) in order to export your type. Function getNewUDT() as myType Dim retVal as new myType getNewUDT = retVal End Function - Can I use public/private keywords in order to affect the UDT scope? example Private Type MyUDT .. ... End Type - can I use an UDT as a result type for a basic function? example: Type MyUDT .. End Type Function Test() as MyUDT End Function - Can I use an UDT as a parameter type into a basic sub or function? example: sub Test( myParam As MyUDT ) ... End Sub - Can I use Basic UDT's as parameters for Windows API's as it usually happens in VB/VBA ? (guess no) I don't know. - Can I declare an array as an UDT's member ? example Type MyUDT MyList(4) As Long ... - Can I declare a fixed lenght string as an UDT's member ? Type MyUDT MyFixedString As String*6 ... Thank you very much for any information Paolo Mantovani No, you can't store arrays in structs, but you can store other userdefined structs and uno-structs, just like other objects. Andrew Pitoniak describes how to create nested structs in order to get something like hashes (dictionaries). If you need to preserve your struct as a global variable you have to save it within an *variant*-array. It gets lost otherwise. http://www.openoffice.org/issues/show_bug.cgi?id=52057 This may be used for implementing crude pseudo-classes in pure Basic, but you have to write constructors and destructors by your own. Type myType S as String*5 Address as com.sun.star.table.CellAddress 'Elements(0) 'compile error End Type Global gType as myType 'gets lost Global gTypes(0) as myType 'values in gTypes(0) get lost Global gTypesVariant(0) 'values in gTypesVariant(0) are preserved after execution - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [udk-dev] pyUNO bridge status ?
Hi, yes, I am still there and will do bugfixes in general, currently there is one serious bug and a few minor bugs, which I am going to fix sometime in future ... However, I currently can't give you much hope for future extensions, e.g. - python 2.5 - uno components that can be implemented with multiple python files . Therefor it would be good to have someone else working on pyuno ... Bye, Joerg Laurent Godard wrote: Hi all What is the python bridge status ? Does someone still maintain it ? Joerg ? Do you think a call for help would be needed for keeping pyUNO usable on a long run ? Laurent - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [udk-dev] pyUNO bridge status ?
Hi Joerg yes, I am still there and will do bugfixes in general, currently there is one serious bug and a few minor bugs, which I am going to fix sometime in future ... Thanks a lot I'm happy toera that :) However, I currently can't give you much hope for future extensions, e.g. - python 2.5 - uno components that can be implemented with multiple python files yes, these are major needs. Especially the second point . Therefor it would be good to have someone else working on pyuno ... I totally agree :) Would you be able to help future volunteers to learn the pyUNO things in order to relay at term ? Thanks a lot Joerg Laurent -- Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org - http://www.indesko.com Nuxeo Enterprise Content Management http://www.nuxeo.com - http://www.nuxeo.org Livre Programmation OpenOffice.org, Eyrolles 2004-2006 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]