[Solved] Processing input arguments

Java, C++, C#, Delphi... - Using the UNO bridges
Post Reply
saleem145
Posts: 130
Joined: Mon Jul 02, 2012 4:47 pm

[Solved] Processing input arguments

Post by saleem145 »

class StockVisuJob(unohelper.Base, XJobExecutor):

def __init__(self, ctx):
# store the component context for later use
self.ctx = ctx

def trigger(self, args):

temp = args
temp.Split("&")

I suspect something is wrong with the string split??
Last edited by saleem145 on Tue Jul 31, 2012 11:42 pm, edited 1 time in total.
OpenOffice 3.4.0
Mac OS X 10.5.8
FJCC
Moderator
Posts: 9280
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Processing input arguments

Post by FJCC »

If args is a string, then

Code: Select all

MyArgs = temp.split("&")
will create a list called MyArgs. The elements of MyArgs will be the text of temp split at the & characters. Notice that split starts with a lower case s.
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
User avatar
Charlie Young
Volunteer
Posts: 1559
Joined: Fri May 14, 2010 1:07 am

Re: Processing input arguments

Post by Charlie Young »

saleem145 wrote:class StockVisuJob(unohelper.Base, XJobExecutor):

def __init__(self, ctx):
# store the component context for later use
self.ctx = ctx

def trigger(self, args):

temp = args
temp.Split("&")

I suspect something is wrong with the string split??
Split should be split (lowercase), and I guess you want

Code: Select all

temp = args.split("&")
Apache OpenOffice 4.1.1
Windows XP
saleem145
Posts: 130
Joined: Mon Jul 02, 2012 4:47 pm

Re: Processing input arguments

Post by saleem145 »

Yes I figured that one out....sorry for the dummy post....
OpenOffice 3.4.0
Mac OS X 10.5.8
Post Reply