[api-dev] Re: Custom types drives me nuts – this can't be happening… can it?

2011-08-18 Thread Johnny Rosenberg
he magic words ”Option Compatible” involved… ;D Kind regards Johnny Rosenberg ジョニー・ローゼンバーグ > > On 08/15/2011 08:48 AM, Johnny Rosenberg wrote: >> >> Okej, forget this, I solved it. Immediately after I sent this I found >> the problem! All I needed to do to find it out w

[api-dev] Re: Constant values for Function arguments

2011-08-18 Thread Johnny Rosenberg
h some times, which makes it even harder for me, since almost all information I can find is in English. Best regards Johnny Rosenberg ジョニー・ローゼンバーグ > > Try to put a character in Front (i.E. nValue, or myString)  and > everything works as expected.... > > Best regards > Tho

[api-dev] Re: ReDim driving me crazy again…

2011-08-18 Thread Johnny Rosenberg
this mailing list...  Don't take it personal.  :) Well, I'll try not to… ;D Do you happen to know of a list for things like this with more activity? LibreOffice didn't seem to have a similar list either. Kind regards J

[api-dev] Constant values for Function arguments

2011-08-18 Thread Johnny Rosenberg
least not when adding them to each other. ”A=VALUE” works in both my examples, but obviously not ”A=VALUE+STRING+FORMULA” for some reason I am sure absolutely nobody can explain, so please prove me wrong here…! :D Kind regards Johnny Rosenberg ジョニー・ローゼンバーグ -- --

[api-dev] Re: ReDim driving me crazy again…

2011-08-18 Thread Johnny Rosenberg
this project but not in all cases), but I still want to know if this is a bug or not, so I can report it if it is. Thanks for your input, you are the only one who replied, so I guess most people hate me for all those annoying questions I posted recently…

[api-dev] Re: ReDim driving me crazy again…

2011-08-17 Thread Johnny Rosenberg
So here I am again, having fun by sending messages to myself… 2011/8/17 Johnny Rosenberg : > 2011/8/17 Johnny Rosenberg : >> 2011/8/17 Johnny Rosenberg : >>> I edited a lot of code yesterday, one of the rows I did NOT edit was >>> this one, which occurs at the top of

[api-dev] Re: ReDim driving me crazy again…

2011-08-17 Thread Johnny Rosenberg
2011/8/17 Johnny Rosenberg : > 2011/8/17 Johnny Rosenberg : >> I edited a lot of code yesterday, one of the rows I did NOT edit was >> this one, which occurs at the top of a subroutine: >> >> ReDim NDice(1 To 6) As Integer >> >> It is defined in anothe

[api-dev] Re: ReDim driving me crazy again…

2011-08-17 Thread Johnny Rosenberg
2011/8/17 Johnny Rosenberg : > I edited a lot of code yesterday, one of the rows I did NOT edit was > this one, which occurs at the top of a subroutine: > > ReDim NDice(1 To 6) As Integer > > It is defined in another module as: > Public NDice(1 To 6) As Integer > > &

[api-dev] ReDim driving me crazy again…

2011-08-17 Thread Johnny Rosenberg
I edited a lot of code yesterday, one of the rows I did NOT edit was this one, which occurs at the top of a subroutine: ReDim NDice(1 To 6) As Integer It is defined in another module as: Public NDice(1 To 6) As Integer The error message I get is (translated from Swedish): ”BASIC syntax error: T

[api-dev] Re: Custom types drives me nuts – this can't be happening… can it?

2011-08-15 Thread Johnny Rosenberg
removing the Experiment ones, everything worked as expected. Phew, what a relief… I thought I was crazy there for a few minutes…! And I usually don't top post, but in this case I thought it could be appropriate, since the text below suddenly became very unimportant. Best regards Johnny Rose

[api-dev] Custom types drives me nuts – this can't be happening… can it?

2011-08-15 Thread Johnny Rosenberg
s perfectly as a stand-alone subroutine, it doesn't work in the game. What happens in the game is that everytime I change the value of DiceFreq(i).Value or DiceFreq(i).Count, BOTH instances are changed, for example if I set DiceFreq(0).Value to 5, DiceFreq(1).V

[api-dev] ReDim of a variable of a custom type

2011-08-15 Thread Johnny Rosenberg
I wrote some example code: REM * BASIC * Option Compatible Option Explicit Type MyType a As Integer b As Integer End Type Dim x(1) As MyType Sub Main Dim y As MyType Dim i As Integer For i=0 To 1 x(i).a=1+i*2 x(i

[api-dev] Re: How can I read my code in a module in the Basic IDE with Basic code?

2011-08-14 Thread Johnny Rosenberg
2011/8/14 Johnny Rosenberg : > 2011/8/14 Johnny Rosenberg : >> 2011/8/14 Johnny Rosenberg : >>> 2011/8/14 Oliver Brinzing : >>>> Hi Johnny, >>>> >>>>> If I only can read all the text in one module at once, that would do >>>&

[api-dev] Re: How can I read my code in a module in the Basic IDE with Basic code?

2011-08-14 Thread Johnny Rosenberg
2011/8/14 Johnny Rosenberg : > 2011/8/14 Johnny Rosenberg : >> 2011/8/14 Oliver Brinzing : >>> Hi Johnny, >>> >>>> If I only can read all the text in one module at once, that would do >>>> it just fine. If there is a simple one-liner that reads j

[api-dev] Re: How can I read my code in a module in the Basic IDE with Basic code?

2011-08-14 Thread Johnny Rosenberg
2011/8/14 Johnny Rosenberg : > 2011/8/14 Oliver Brinzing : >> Hi Johnny, >> >>> If I only can read all the text in one module at once, that would do >>> it just fine. If there is a simple one-liner that reads just one >>> function or subroutine, th

[api-dev] Re: How can I read my code in a module in the Basic IDE with Basic code?

2011-08-14 Thread Johnny Rosenberg
0 To uBound(mTmp()) >                s = s + mTmp(i) & Chr(13) >        Next i >        MsgBox s > >        MsgBox oLib.getByName(mTmp(0)) > > End Sub No, I didn't, but it seems to work for my global macros. I guess I need to change the ”oLi

[api-dev] How can I read my code in a module in the Basic IDE with Basic code?

2011-08-13 Thread Johnny Rosenberg
documents, I just can't figure out how to reach the text in the IDE. Hoping for an answer even though I noticed that this list seems quite dead these days. Maybe people are busy doing real things… Kind regards Johnny Rosenbe

[api-dev] Re: Global variables – OpenOffice.org Basic

2011-08-13 Thread Johnny Rosenberg
ike to be compatible with that… Anyway, it worked (as far as I remember) without Global, but NOT from the IDE by pressing F5 in some cases. Kind regards Johnny Rosenberg ジョニー・ローゼンバーグ > > > On 08/08/2011 11:42 AM, Johnny Rosenberg wrote: >> >> I am testing some functions at t

[api-dev] OpenOffice.org Basic – Arrays as parameters in functions

2011-08-12 Thread Johnny Rosenberg
that ”Something” is just that, something, not a known value. Using the variant trick seems to be cheating to me… Is it the only way to go, really? Kind regards Johnny Rosenberg ジョニー・ローゼンバーグ -- - To unsubscribe send email to dev-unsu

[api-dev] Re: Global variables – OpenOffice.org Basic

2011-08-09 Thread Johnny Rosenberg
Seems like replacing the word ”Dim” by ”Global” solved my problem. I just wonder why ”Dim” works when I don't run the macro from within the Basic IDE. Kind regards Johnny Rosenberg ジョニー・ローゼンバーグ -- - To unsubscribe send ema

[api-dev] Re: Global variables – OpenOffice.org Basic

2011-08-08 Thread Johnny Rosenberg
2011/8/8 Johnny Rosenberg : > I am testing some functions at the moment (I wrote them a few years > ago and now I'm trying to make them faster…) but I am a bit stuck at > the moment. > > It looks something like this: > > Module1 > ¯¯¯ > ' Code starts her

[api-dev] Global variables – OpenOffice.org Basic

2011-08-08 Thread Johnny Rosenberg
odule2 when ”OneThing” is mentioned. Shouldn't the global things be available in all modules? They are if I run similar macros from a spreadsheet, for example, that is not from the Basic IDE. Did I miss something here? Is there a way around it? Kind regards

[api-dev] Re: Missing a Frac() function

2011-08-08 Thread Johnny Rosenberg
2011/8/8 Christoph Jopp : > Am 08.08.2011 12:28, schrieb Johnny Rosenberg: >> 2011/8/8 Christoph Jopp : >>> Hi Johnny, >>> >>> Am 07.08.2011 16:55, schrieb Johnny Rosenberg: >>>> Am I the only one who miss a Frac() function in OpenOffice.org Basic

[api-dev] Re: Missing a Frac() function

2011-08-08 Thread Johnny Rosenberg
2011/8/8 Christoph Jopp : > Hi Johnny, > > Am 07.08.2011 16:55, schrieb Johnny Rosenberg: >> Am I the only one who miss a Frac() function in OpenOffice.org Basic >> and as a cell function? >> >> I always have to use my own function, which is probably slower tha

[api-dev] Missing a Frac() function

2011-08-07 Thread Johnny Rosenberg
case there is a Frac() function after all, what's it called? Kind regards Johnny Rosenberg ジョニー・ローゼンバーグ -- - To unsubscribe send email to dev-unsubscr...@api.openoffice.org For additional commands send email to sy...@api.openoffice.org with Subject: help

[api-dev] Re: Getting information from some site via Basic IDE – possible? How?

2011-08-05 Thread Johnny Rosenberg
gt; Gave also look a some Translater extentions, they use Google Translate and > send and get back translated  strings from Google > > Greetz > > Fernand >> >> Not that I am aware of. The Basic IDE is woefully oldfashioned . >> >> Greetings >> >> e

[api-dev] Getting information from some site via Basic IDE – possible? How?

2011-07-16 Thread Johnny Rosenberg
Is it possible with the OpenOffice.org BASIC IDE to access a web site, login, copy some text to the clipboard, and then logout? Any hints? Kind regards Johnny Rosenberg ジョニー・ローゼンバーグ -- - To unsubscribe send email to dev-unsubscr

[api-dev] Re: LibreOffice/OpenOffice.org BASIC – CDbl doesn't work properly with string argument

2011-06-07 Thread Johnny Rosenberg
stributions. However the bugreport was about OpenOffice.org 2.something, so I was a bit surprised that they didn't fix this yet. Maybe I should bring the bug report to the Ubuntu people instead. Regards Johnny Rosenberg ジョニー・ローゼンバーグ > > Regards >  Bernard > > -- >

[api-dev] LibreOffice/OpenOffice.org BASIC – CDbl doesn't work properly with string argument

2011-06-06 Thread Johnny Rosenberg
nvert from text to a numerical value? Kind regards Johnny Rosenberg ジョニー・ローゼンバーグ -- - To unsubscribe send email to dev-unsubscr...@api.openoffice.org For additional commands send email to sy...@api.openoffice.org with Subject: help

[api-dev] Re: Scrolling a spreadsheet with a macro

2011-03-05 Thread Johnny Rosenberg
Den 2011-03-05 10:34:58 skrev Niklas Nebel : On 05.03.2011 01:06, Johnny Rosenberg wrote: I just ran into a problem doing this. The problem is that I have ”fixed” the sheet, so I am always able to see the first rows and the first column, so the A column and the 4 first rows are always visible

[api-dev] Re: Scrolling a spreadsheet with a macro

2011-03-04 Thread Johnny Rosenberg
Den 2011-03-04 17:56:12 skrev Niklas Nebel : On 04.03.2011 17:18, Johnny Rosenberg wrote: Have been looking for it with Xray, but so far I didn't find anything that I think does what I want. What I want to do is to search for a cell. When I find it, I want it to appear as the first ro

[api-dev] Re: Scrolling a spreadsheet with a macro

2011-03-04 Thread Johnny Rosenberg
Den 2011-03-04 17:56:12 skrev Niklas Nebel : On 04.03.2011 17:18, Johnny Rosenberg wrote: Have been looking for it with Xray, but so far I didn't find anything that I think does what I want. What I want to do is to search for a cell. When I find it, I want it to appear as the first ro

[api-dev] Scrolling a spreadsheet with a macro

2011-03-04 Thread Johnny Rosenberg
Then I want the sheet to scroll so that it appears like this: C D E F G H I J… 7 8 9 10 11 12 13 14 15 ⁝ -- Kind regards Johnny Rosenberg -- - To unsubscribe send email to dev-unsubscr...@api.openoffice.org

Re: [api-dev] Open Office Calc In VB?

2010-12-28 Thread Johnny Rosenberg
cros are advanced I guess you need to rewrite them for OpenOffice.org Calc from scratch, unfortunately, but hopefully I am wrong there… -- Kind regards Johnny Rosenberg - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice

Re: [api-dev] Examining a directory with OpenOffice.org Basic

2010-12-03 Thread Johnny Rosenberg
Den 2010-12-03 07:05:17 skrev Andrew Douglas Pitonyak : On 12/02/2010 11:10 AM, Johnny Rosenberg wrote: Den 2010-12-02 03:26:53 skrev Andrew Douglas Pitonyak : There should be an example in this: http://www.pitonyak.org/OOME_3_0.odt http://www.pitonyak.org/AndrewMacro.pdf I

Re: [api-dev] Examining a directory with OpenOffice.org Basic

2010-12-02 Thread Johnny Rosenberg
Den 2010-12-02 03:26:53 skrev Andrew Douglas Pitonyak : There should be an example in this: http://www.pitonyak.org/OOME_3_0.odt http://www.pitonyak.org/AndrewMacro.pdf I searched this one (maybe too quickly) but I didn't find an example that I understood… I'll look again.

Re: [api-dev] Re: Examining a directory with OpenOffice.org Basic

2010-12-01 Thread Johnny Rosenberg
Den 2010-12-01 14:53:01 skrev Clayton : On 12/01/2010 02:38 PM, Johnny Rosenberg wrote: 2010/12/1 Johnny Rosenberg: If I know the name of a directory, let's say ~/MyImages, how can I easily read the names of all the files in that directory? Let's say that we will fill an array wi

[api-dev] Re: Examining a directory with OpenOffice.org Basic

2010-12-01 Thread Johnny Rosenberg
2010/12/1 Johnny Rosenberg : > If I know the name of a directory, let's say ~/MyImages, how can I > easily read the names of all the files in that directory? Let's say > that we will fill an array with all the file names. > > I have searched a bit online, but so far I di

[api-dev] Examining a directory with OpenOffice.org Basic

2010-12-01 Thread Johnny Rosenberg
l continue searching, though. All kinds of hints are appreciated… Regards Johnny Rosenberg - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org

Re: [api-dev] Please verify bug in StarBasic Format command

2010-06-26 Thread Johnny Rosenberg
produces the expected output from ddd, namely > the three letter day name. Same happens for me, except that day name is two letters (in Swedish): d// h:nn:ss => 26-juni-2010 9:lö:46 (lö=lördag=saturday) > > "d// h:dd:ss" => dd produces the two dig

Re: [api-dev] Where is the path to OpenOffice.org installation

2010-06-25 Thread Johnny Rosenberg
merge >>  /usr/lib/openoffice.org/ure/bin/regview >>  /usr/lib/openoffice.org/ure/bin/startup.sh >>  /usr/lib/openoffice.org/ure/bin/uno >>  /usr/lib/openoffice.org/ure/bin/uno.bin >>  /usr/lib/openoffice.org/ure/bin/versionrc >>  /usr/lib/openoffice.org3/program/scalc.bin >>  /usr/lib/openoffice.org3/program/sdraw.bin >>  /usr/lib/openoffice.org3/program/simpress.bin >>  /usr/lib/openoffice.org3/program/soffice.bin >>  /usr/lib/openoffice.org3/program/swriter.bin >>  /usr/lib/openoffice.org3/program/unopkg.bin >>  /usr/share/mimelnk/application/openoffice.org-ms-excel-sheet-binary-12.desktop 2010/6/25 Konstantin Tokarev : > Hi! > From your output I guess you have 2 copies of OpenOffice.org: 3.1 from your > Linux distribution and 3.2 official. You should decide which one you'd like > to use > -- > Regards, > Konstantin I don't know which Linux distro the OP has, but if it's Ubuntu I would uninstall the 3.1 from the repos and keep the 3.2 vanilla version. The Ubuntu version has some issues, some things I found that actually does not work. Things that work perfectly with the vanilla version. Johnny Rosenberg - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org

Re: [api-dev] Measuring time with OpenOffice.org BASIC

2010-05-30 Thread Johnny Rosenberg
2010/5/30 Johnny Rosenberg : > 2010/5/30 Bernard Marcelly : >> Message de Konstantin Tokarev  date 2010-05-29 19:10 : >>> >>>> On MS-Windows the result is in milliseconds, with a precision of 16 ms >>>> due to IBM PC hardware design. >>> >&g

Re: [api-dev] Measuring time with OpenOffice.org BASIC

2010-05-30 Thread Johnny Rosenberg
, like in your example above, and it runs quite a few times for one tick, so why doesn't it realize that it's time to stop until (t2-t1)*86400 almost reaches 2? Yes, a bit out of topic, I know, but still interesting to know… For example one of the outputs is like this: Ticks/s: 1605 Loop: 43638 t1= 40328,4520717593 t2= 40328,4520949074 t2-t1= 2,31481462833472E-05 In s: 1,9983888119 Why didn't it stop until (t2-t1)*86400≈2? It should have been ⩾1 thousands of times before that, shouldn't it? Johnny Rosenberg - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org

Re: [api-dev] Measuring time with OpenOffice.org BASIC

2010-05-30 Thread Johnny Rosenberg
2010/5/30 Bernard Marcelly : > Message de Johnny Rosenberg  date 2010-05-29 23:05 : >> >> I know about the GetSystemTicks() function, but isn't that System >> Ticks rather than time? Like CPU time or something like that. >> I want to know the time from when I

Re: [api-dev] Measuring time with OpenOffice.org BASIC

2010-05-29 Thread Johnny Rosenberg
2010/5/29 Bernard Marcelly : > Hello Johnny, > Message de Johnny Rosenberg  date 2010-05-29 17:53 : >> >> Have been searching in Help but I didn't find anything so far. I want >> the current time in ms, but all I find is the now() function which >> seems to have

[api-dev] Measuring time with OpenOffice.org BASIC

2010-05-29 Thread Johnny Rosenberg
Have been searching in Help but I didn't find anything so far. I want the current time in ms, but all I find is the now() function which seems to have 1 s for resolution. Hints? Johnny Rosenberg - To unsubscribe, e-mail

[api-dev] OpenOffice.org BASIC – create a search descriptor for the current selection

2010-02-13 Thread Johnny Rosenberg
= ThisComponent.createReplaceDescriptor() This line does not work, because there is no such method: oReplace = ThisComponent.getCurrentController().getSelection().createReplaceDescriptor() So is this possible at all? Shouldn't it be? It is, right? But how? Regards Johnny Rose

Re: [api-dev] Sharing macros with people…

2010-01-13 Thread Johnny Rosenberg
2010/1/12 Juergen Schmidt : > On 1/12/10 7:19 PM, Alexandro Colorado wrote: >> >> >> On Tue, Jan 12, 2010 at 11:43 AM, Johnny Rosenberg >> wrote: >>> >>> 2010/1/12 Alexandro Colorado : >>>> >>>> >>>> On Mon, Dec 21,

Re: [api-dev] Sharing macros with people…

2010-01-12 Thread Johnny Rosenberg
2010/1/12 Alexandro Colorado : > > > On Mon, Dec 21, 2009 at 11:42 AM, Johnny Rosenberg > wrote: >> >> 2009/12/20 Ariel Constenla-Haile : >>> >>> Hello Johnny, >>> >>> On Sunday 20 December 2009, 14:19, Johnny Rosenberg wrote: >>

Re: [api-dev] Trying to understand random access to a file with OpenOffice.org Basic

2010-01-04 Thread Johnny Rosenberg
2010/1/4 Cor Nouws : > Hi Johnny, > > Johnny Rosenberg wrote (04-01-10 18:08) > >> 61277 seems to be the bug that I am talking about, so obviously there >> is a bug report at least. Too bad that no one seems to care about >> OpenOffice.org Basic anymore. > >

Re: [api-dev] Trying to understand random access to a file with OpenOffice.org Basic

2010-01-04 Thread Johnny Rosenberg
her problem with this ancient file access. > http://www.openoffice.org/issues/show_bug.cgi?id=61277 61277 seems to be the bug that I am talking about, so obviously there is a bug report at least. Too bad that no one seems to care about OpenOffice.org Basic anymore. Regards Johnny Rosenberg &

Re: [api-dev] Trying to understand random access to a file with OpenOffice.org Basic

2010-01-04 Thread Johnny Rosenberg
2010/1/4 Bernard Marcelly : > Message de Johnny Rosenberg  date 2010-01-01 13:58 : >> >> The first thing I did was to look in AndrewMacro.odt, the famous macro >> document by Andrew Pitonyak. I found this example, and I actually also >> found the same example in th

[api-dev] Trying to understand random access to a file with OpenOffice.org Basic

2010-01-01 Thread Johnny Rosenberg
t Z” which I assume is correct. So for some reason I can't use a string variable instead of a string like ”Z”. Why is that? Does anyone know if the ”brokenness” I was talking about is a bug in OpenOffice.org or if the macro just needs to be rewritten somehow? Since this example is in t

Re: [api-dev] Sharing macros with people…

2009-12-21 Thread Johnny Rosenberg
2009/12/20 Ariel Constenla-Haile : > Hello Johnny, > > On Sunday 20 December 2009, 14:19, Johnny Rosenberg wrote: >> Anyone who can point me to somewhere where I can learn to create an >> add-on or extension? My thought is that the person to whom I send it >> shou

[api-dev] Sharing macros with people…

2009-12-20 Thread Johnny Rosenberg
Anyone who can point me to somewhere where I can learn to create an add-on or extension? My thought is that the person to whom I send it should easily install it by the extension manager, so I guess I need to create an OXT somehow. How is all that done properly? Johnny Rosenberg

Re: [api-dev] OpenOffice.org Basic - Search and Repl ace in code…

2009-10-28 Thread Johnny Rosenberg
2009/10/28 Jan Holst Jensen : > Andrew Douglas Pitonyak wrote: >> >> You should post your code... >> >> On 10/24/2009 06:05 AM, Johnny Rosenberg wrote: >>> >>> One example: >>> Search for: ([a-zA-Z0-9\(\)])([\+|\-|\*|\/])([a-zA-Z0-9\(\

[api-dev] OpenOffice.org Basic - Search and Replace in code…

2009-10-24 Thread Johnny Rosenberg
(x$1 $2 $3 Doesn't look very nice to me… Is this a bug or am I not supposed to do this? Johnny Rosenberg - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org

Re: [api-dev] OOo BASIC - Somewhat tricky arrays…

2009-10-02 Thread Johnny Rosenberg
2009/10/2 Johnny Rosenberg : > 2009/10/2 Fernand Vanrie : >> Johnny , >> >> I had also some strange experiences with sorted arrays using the >> "Bubblesortlist" function, but thats not the reason for this reply. Why >> using Calc en not a Base docume

Re: [api-dev] OOo BASIC - Somewhat tricky arrays…

2009-10-02 Thread Johnny Rosenberg
2009/10/2 Fernand Vanrie : > Johnny , > > I had also some strange experiences with sorted arrays using the > "Bubblesortlist" function, but thats not the reason for this reply. Why > using Calc en not a Base document for hosting your dialogs and storing the > results ? 1. Historical reasons. Origi

[api-dev] OOo BASIC - Somewhat tricky arrays…

2009-10-01 Thread Johnny Rosenberg
I am writing a quite big macro thing, it's actually a simple game in Calc, called ”Maxi-Yatzy” in Swedish, somewhat known as a Swedish extended variant of Yahtzee, with 6 dice, 20 categories and you can save two of your three rolls for later. I ran into something that made me vary confused for qui

Re: [api-dev] "Get last used column/row" in a spreadsheet (Macro)

2009-09-07 Thread Johnny Rosenberg
issue may be that the author of that >> particular macro (probably me) was not properly efficient, or, that OOo did >> not support the methodology. In this case, I suspect the first. >> >> On 08/30/2009 08:54 AM, Johnny Rosenberg wrote: >>> >>> At page 142 in

Re: [api-dev] Reading the label from a button in a dialogue - how?

2009-09-06 Thread Johnny Rosenberg
Prints ”Testing!" End Sub Best regards Johnny Rosenberg 2009/9/6 Cor Nouws : > Johnny Rosenberg wrote (6-9-2009 22:15) >> >> 2009/9/6 Cor Nouws : >>> >>>    Dlg.getControl("CommandButton1").getModel.text = "" > >> No, it won

Re: [api-dev] Reading the label from a button in a dialogue - how?

2009-09-06 Thread Johnny Rosenberg
2009/9/6 Cor Nouws : > Hi Johnny, > > Johnny Rosenberg wrote (6-9-2009 20:43) > >>        Ctl=Dlg.getControl("CommandButton1") > > >     Dlg.getControl("CommandButton1").getModel.text = "" > > will work No, it won't. There is

[api-dev] Reading the label from a button in a dialogue - how?

2009-09-06 Thread Johnny Rosenberg
” of the button. Is it a ”Do this” button or is it currently a ”Do the other thing” button? I really need to know that, or at least my subroutine does. Of course I could have two different buttons, but I thought this would be cool, and that's reason enough for me to try to achieve this…

Re: [api-dev] Problems with Type…

2009-09-05 Thread Johnny Rosenberg
2009/9/5 Bernard Marcelly : > Message de Johnny Rosenberg  date 2009-09-05 13:24 : >> >>        MyArray().Nick=TempArray(0) ' This line produces the error message >> ”BASIC runtime error. Object variable not set.” >> >> Then I expect the following variables

[api-dev] Problems with Type…

2009-09-05 Thread Johnny Rosenberg
Nick="Four" MyArray(5).Nick="Five" MyArray(6).Nick="Six" MyArray(7).Nick="Seven" MyArray(8).Nick="Eight" Am I totally approaching this the completely wrong way? Johnny Rosenberg - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org

Re: [api-dev] Detecting which button was pressed with a Basic Macro

2009-08-31 Thread Johnny Rosenberg
2009/8/30 Drew Jensen : > Ariel Constenla-Haile wrote: >> >> Hello Drew, >> >> On Sunday 30 August 2009, 13:49, Drew Jensen wrote: >> >>> >>> Ariel Constenla-Haile wrote: >>> Sub BtnPressed(oEvent as Object)        Dim oControl as Object        Dim oModel as Object    

[api-dev] I don't understand this: Empty strings and setDataArray

2009-08-30 Thread Johnny Rosenberg
e it works as long as no element of the array = "". I know how I can get around this, but I really don't think that it should be necessary. Is this a bug? Johnny Rosenberg - To unsubscribe, e-mail: dev-unsubscr.

Re: [api-dev] Detecting which button was pressed with a Basic Macro

2009-08-30 Thread Johnny Rosenberg
2009/8/30 Ariel Constenla-Haile : > Hello Johnny, > > On Sunday 30 August 2009, 12:57, Johnny Rosenberg wrote: >> I have a dialogue with some buttons and boxes. Eight of the buttons >> does basically the same thing, but to different objects, so I need to >> write 8 mac

Re: [api-dev] Detecting which button was pressed with a Basic Macro

2009-08-30 Thread Johnny Rosenberg
; sub mySub (oeVt) >        print oEvt.Source.name > end sub > > > HTH This helped indeed. It was wrong, but it helped… There is no oEvt.Source.Name, but now that I know this is possible I used Xray and found oEvt.Source.getModel

[api-dev] Detecting which button was pressed with a Basic Macro

2009-08-30 Thread Johnny Rosenberg
when thinking about it, this solution is maybe not that much convenient after all… Suggestions? Johnny Rosenberg - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org

[api-dev] "Get last used column/row" in a spreadsheet (Macro)

2009-08-30 Thread Johnny Rosenberg
s and just as easy to follow (in my opinion): Function getLastUsedColumn(oSheet as Object) as Integer Dim oCursor As Object oCursor = oSheet.createCursor oCursor.GotoEndOfUsedArea(True) GetLastUsedColumn = oCursor.RangeAddress.EndColumn End Function Johnny Rose

Re: [api-dev] OpenOffice.org BASIC - Global variables

2009-07-17 Thread Johnny Rosenberg
2009/7/17 Bernard Marcelly : > Hi Johnny, > Message de Johnny Rosenberg  date 2009-07-17 18:21 : >> >> As I understand it, global variables should be declared first of all, >> before all subroutines and functions in a module, right? >> >> Like this: >> &g

[api-dev] OpenOffice.org BASIC - Global variables

2009-07-17 Thread Johnny Rosenberg
ccurance I need to use the same descriptor again making sure that I really find the NEXT occurance each time, not the same one. So the modell for doing this is the ”code” above, kind of. Should that work properly? If not, what am I doing wrong? Johnny Rosenberg

[api-dev] Lost BASIC function… possible to get it back?

2009-06-19 Thread Johnny Rosenberg
o get it back some how? OpenOffice.org Calc 3.1.0 Ubuntu 8.10 Kind regards Johnny Rosenberg - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org

Re: [api-dev] Custom cell function - how to detect empty cell?

2009-06-19 Thread Johnny Rosenberg
2009/6/19 Niklas Nebel : > On 06/19/09 11:50, Johnny Rosenberg wrote: >> >> I have a little follow up question to this: >> When OpenOffice.org 3 arrived, some of my formulas stopped working, >> because in some of my calculations a few empty cells were apart of it. >&

Re: [api-dev] Custom cell function - how to detect empty cell?

2009-06-19 Thread Johnny Rosenberg
Okay, I maybe didn't wake up properly yet, take a look further below… 2009/6/19 Johnny Rosenberg : > 2009/6/19 Niklas Nebel : >> On 06/18/09 22:31, Johnny Rosenberg wrote: >>> >>> So A should be the content of the cell A1 in this case. However, if A1 >>>

Re: [api-dev] Custom cell function - how to detect empty cell?

2009-06-19 Thread Johnny Rosenberg
2009/6/19 Niklas Nebel : > On 06/18/09 22:31, Johnny Rosenberg wrote: >> >> So A should be the content of the cell A1 in this case. However, if A1 >> is empty, A ends up as a double with the value 0. This makes it quite >> impossible to detect wether a cell is empty or n

[api-dev] Custom cell function - how to detect empty cell?

2009-06-18 Thread Johnny Rosenberg
active cell when the function runs? Even if B45 is only one of a lot of cells that are calculated when autofill is performed? If so, I could just check the ActiveCell.getValue() and ActiveCell.getString() after first creating the object ActiveCell, of course, righ

[api-dev] Re: Problems with global variables in OpenOffice.org BASIC…

2009-06-09 Thread Johnny Rosenberg
Found the answer in the built in help… Dim Dlg As Object Dim LastString As String Should be: Global Dlg As Object Global LastString As String Johnny Rosenberg 2009/6/9 Johnny Rosenberg : > > REM  *  BASIC  * > > Option Explicit > > Dim Dlg As Object > Dim

[api-dev] Problems with global variables in OpenOffice.org BAS IC…

2009-06-09 Thread Johnny Rosenberg
of the textfield to LastString. First time I run it, LastString is of course empty, but why is it empty the second time? I am obviously missing something, so how am I supposed to do this? I just want the dialogue to be pre filled with the value I entered last time, that's all… Kind

Re: [api-dev] OpenOffice.org BASIC Sorting

2009-05-25 Thread Johnny Rosenberg
2009/5/24 Bernard Marcelly : > Message de Johnny Rosenberg  date 2009-05-24 18:44 : >> >> 2009/5/24 Oliver Brinzing : >>> >>> Hi Johnny, >>> >>>> With Xray I found not only createSearchDescriptor in a range, but also >>>> cr

Re: [api-dev] OpenOffice.org BASIC Sorting

2009-05-24 Thread Johnny Rosenberg
antage with it, compared to the other method: The code seems to be much ”cleaner” and easier to follow. At least I think so at the moment… Kind regards Johnny Rosenberg > > Oliver > > -- > > GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 > > --

Re: [api-dev] Four quick questions about OpenOffice.org BASIC (for Calc)

2009-05-24 Thread Johnny Rosenberg
ng them available for every document rather than a specific one), but maybe one of the other guides on that site will help me with that. Kind regards Johnny Rosenberg > > for firefox you can add an extension which will help you finding more > information: > https://addons.mozilla.org/de

[api-dev] OpenOffice.org BASIC Sorting

2009-05-24 Thread Johnny Rosenberg
w anybody doing this, I guess it's impossible, but why? Kind regards Johnny Rosenberg - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org

[api-dev] Four quick questions about OpenOffice.org BASIC (for Calc)

2009-05-23 Thread Johnny Rosenberg
macro recorder at all would probably be better than the crap we have had so far. It confuses more than it helps and the macros it produce never work anyway and relative macro recording is still not possible. Kind regards Johnny Rosenberg

[api-dev] Re: OpenOffice.org BASIC: How to deal with the clipboard?

2009-01-01 Thread Johnny Rosenberg
eed the whole spreadsheet, because there are some formulas in some cells that matters more or less. I guess it doesn't matter much, since all I wanted to do was to tell you that I made it. It works now and I am very happy with it. ☺ J.R. 2009/1/1 Johnny Rosenberg > > Oops… sorry,

[api-dev] Re: OpenOffice.org BASIC: How to deal with the clipboard?

2009-01-01 Thread Johnny Rosenberg
reading anyway. J.R. 2009/1/1 Johnny Rosenberg > I want to do the following: > > With my web browser I go to my bank's web page and log in to my account. > Then a summary of all my accounts shows up. I select all of its text and > press Ctrl+c. > > Then I switch to

[api-dev] OpenOffice.org BASIC: How to deal with the clipboard?

2009-01-01 Thread Johnny Rosenberg
ion DIRECTLY from the clipboard. I hope this is not too confusing… What I need to know is just how to get what's currently in the clipboard… Best regards Johnny Rosenberg

Re: [api-dev] Function for ”transposing” a two dimensional array?

2008-10-11 Thread Johnny Rosenberg
2008/10/9 Niklas Nebel <[EMAIL PROTECTED]> > On 10/ 9/08 05:14 PM, Johnny Rosenberg wrote: > >> Don't be… it seems like no one else has a solution neither… But I think >> that >> DataArray structure is a bit odd, because if I create a combo box on a >>

Re: [api-dev] Function for ”transposing” a two dimensional array?

2008-10-09 Thread Johnny Rosenberg
2008/10/9 Cor Nouws <[EMAIL PROTECTED]> > Hi Johnny, > > Johnny Rosenberg wrote (8-10-2008 18:43) > >> I know that there are no "two dimensional arrays" in OpenOffice.org Basic, >> but rather arrays of arrays, but that is kind of what this problem is

[api-dev] Function for ”transposing” a two dimensional array?

2008-10-08 Thread Johnny Rosenberg
I know that there are no "two dimensional arrays" in OpenOffice.org Basic, but rather arrays of arrays, but that is kind of what this problem is all about. I have an array like this: StringArray=ThisComponent.Sheets.getByName("Example").getCellRangeByPosition(1,1,1,101).getDataArray() I want to u

Re: [api-dev] Basic Dialogues doesn't look like when I created them.

2008-09-14 Thread Johnny Rosenberg
2008/9/14 Alexandro Colorado <[EMAIL PROTECTED]> > On Sat, 13 Sep 2008 19:27:53 -0500, Johnny Rosenberg < > [EMAIL PROTECTED]> wrote: > > In this case I created the dialogue with OpenOffice.org 2.0.4, Operating >> system=Xandros for Eee PC (using an Eee PC 900, Swe

Re: [api-dev] Basic Dialogues doesn't look like when I created them.

2008-09-14 Thread Johnny Rosenberg
2008/9/14 Bernard Marcelly <[EMAIL PROTECTED]> > Hi, > Message de Johnny Rosenberg date 2008-09-14 02:27 : > >> In this case I created the dialogue with OpenOffice.org 2.0.4, Operating >> system=Xandros for Eee PC (using an Eee PC 900, Swedish). >> >> Af

[api-dev] Basic Dialogues doesn't look like when I created them.

2008-09-13 Thread Johnny Rosenberg
In this case I created the dialogue with OpenOffice.org 2.0.4, Operating system=Xandros for Eee PC (using an Eee PC 900, Swedish). After loading the document into my Ubuntu 8.04 laptop (not the Eee) with OpenOffice.org 2.4.1 it looks wrong. If I change it, it will immediately change back. I had

Re: [api-dev] the meaning of "="

2008-02-13 Thread Johnny Rosenberg
2008/2/13, Johnny Rosenberg <[EMAIL PROTECTED]>: > > 2008/2/11, Jonathan Kaye <[EMAIL PROTECTED]>: > > > > Johnny Rosenberg wrote: > > > > > > Hi Johnny and Ariel, > > Thanks to both of you. Your advice was extremely helpful and I've been

Re: [api-dev] the meaning of "="

2008-02-13 Thread Johnny Rosenberg
2008/2/11, Jonathan Kaye <[EMAIL PROTECTED]>: > > Johnny Rosenberg wrote: > > > Hi Johnny and Ariel, > Thanks to both of you. Your advice was extremely helpful and I've been > able > to carry on a fair bit until hitting the next obstacle. The contextual >

Re: [api-dev] Macros: argument is not optional

2008-02-10 Thread Johnny Rosenberg
2008/2/10, Jonathan Kaye <[EMAIL PROTECTED]>: > > Hi all, > Trying to write these Basic macros is extremely frustrating. I'm sure I'm > missing some basic documentation somewhere but I can't find it for the > life > of me. > I have written the follow macro: > Function SimpSet(ProcessString) As Stri

Re: [api-dev] Starbasic problem with nested loops

2007-09-09 Thread Johnny Rosenberg
2007/9/8, Helge Kraak <[EMAIL PROTECTED]>: > > > Am 08.09.2007 um 23:00 schrieb Cor Nouws: > > > There are some things you can do to make it easier/better. > > - Add some procedures for dull/lengthy tasks; > > - Option Explicit - a must imo; > > - Seperators; > > - Globals in the header (afaik, als