PxPlus User Forum

Twitter Twitter Twitter

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Peter.Higgins

Pages: 1 ... 3 4 [5] 6 7 8
61
Language / Re: web/ftp regex question
« on: April 15, 2020, 10:35:45 AM »
Thanks Devon, 

Shades of Manifest.  I seem to have lost 3 years.  :o
Are we discussing this year's Direxions version for implementing the msk?

PxPlus-2019 Web (Ver:16.10/MS-WINDOWS) Serno:1610-001-
(c) Copyright 2005-2018 PVX Plus Technologies Ltd. (All rights reserved)
  Website: http://www.pvxplus.com
->?ssn
1610-001-
->

62
Language / web/ftp regex question
« on: April 14, 2020, 07:32:46 PM »
We have been using the web/ftp with the regex option in an INVOKE command.
With simple *.extn  and *.* it works.
There is now a need for using more complex regex and I am not having success returning files.
Version is 14.00 PxPlus.

For instance, in web/ftp
*.gfs|B0M works as a mask in web/ftp but not in PxPlus
^g[0-9]{6}c313260[0-9]*\.gfs|B0M does not work as a mask in web/ftp but works great in PxPlus.
I have tried putting the -'OM'=0 in the invoke statement which has no affect.
Can anyone explain how this works in web/ftp?

Example with an actual file name.
0001 msk$="^g[0-9]{6}c313260[0-9]*\.gfs"  ! "|(^g[0-9]+c313260[0-9]*\.gfs)"
0002 x$="g200410c31326001000000000322285095.gfs"
0003 PRINT MSK(x$,msk$)
0004 PRINT MSL
-;run
 1
 38
-;

63
Language / Re: Unique alternate key question.
« on: February 19, 2020, 09:22:59 AM »
Thanks Mike,
   
The original creator of this key obviously had not worked with record scrolling in BBX emulation mode or they would have known how good an idea that is.
 

64
Programming / Re: Composite string questions
« on: February 14, 2020, 01:58:53 PM »
Mike,
Where the manual is unclear if composite strings support substrings.
Manual.pvxplus.com
DIM > Format 2> Define Composite String
Composite Strings vs. BBx® Templates

The system does not currently support subscripting with composite strings.

Perhaps this applies not to substrings but to arrays??

65
Programming / Re: Composite string questions
« on: February 10, 2020, 02:36:16 PM »
Mike,

I am adding new programs onto some old code that writes string record followed by numeric arrays.
The calls and objects usually get the entire string record portion even when only one field is used.
New work is designed to be more maintainable by use of record IO and composite string variables.
These generally have to be integrated with the existing calls. 

Passing composite strings into lightly modified sub calls/objects would be helpful if this is an actual supported feature. My testing indicates this maybe possible, but the documentation says otherwise.




66
Programming / Composite string questions
« on: February 10, 2020, 10:15:19 AM »

Is the documentation up-to-date re sub-scripting with composite strings?
Is there a convenient way to determine if a variable has been dimmed as a composite string?

67
Language / Unique alternate key question.
« on: February 07, 2020, 10:15:36 AM »
I am curious if it is possible to make an alternate multi-segment key unique in the dictionary where the secondary segments may repeat for other primary segments but should not for the primary segment which is also the first segment of the prime key?  Thinking no-way but hope to be surprised.


68
Nomads / Re: Grids
« on: January 31, 2020, 01:17:55 PM »
Bernie,
Helpful hints:

The fmt$ control property allows you to set the columns format from post display.  Instructions under grid control
Much easier to maintain or make dynamic, especially remotely.

Set properties using the propbag or Pseudo Multi-Properties control properties
(grd'row.colno.value.$="1,1,""Action"","
This reduces your response time tremendously. 

Please do not torment yourself trying to deal with cell data.  All I/O is best done by row, same as reading a record.   
Loading is much faster by entire grid.  Faster to set colors etc after the Data load than mixed in by row.

Control Property LoadIOList$ allows you to get the grids Iolist
gridIOL$=grd'LoadIOList$

Control Property rowdata$ allows you to get the data in or out. 
Get: READ DATA FROM grd'rowdata$,SEP=gFDlm$ TO IOL=gridIOL$,ERR=*NEXT
Put: grd'rowdata$=REC(gridIOL$,SEP=gFDlm$)

Control Property Currentrow is not row, they are unrelated. 
The first is for focus position, the second is for update position.  Focus doesn't change update position.
Ditto with column. 

Nomads has generic variables for controls including grids (See Object Nomads)
This makes generic code much easier. 
id.row for row.
id for current control object.
id$  for current control name.

69
Nomads / Re: How to exit a panel with an <Enter> key
« on: January 31, 2020, 12:57:20 PM »
Mike,
Or a button the size of the panel, in which case a click on the image would do the same as enter.

70
Programming / index object idxinfo.pvc
« on: December 24, 2019, 04:53:36 PM »
Can anyone tell me if the null suppression on the last segment for a Primary internal key is in anyway related to the K: or N: attributes in the index object? 

 ! IF POS("N"=COLUMNATTR$) THEN IDXINFO'COLUMNATTR$="N",IDXINFO'COLUMNNULLCHARACTER$=MID(COLUMNATTR$,POS("N;"=COLUMNATTR$)+2,2),BuildColumnAttr$+="N"
 ! IF POS("K"=COLUMNATTR$) THEN IDXINFO'NULLSUPPRESS=1,IDXINFO'NULLCHARACTER$=MID(COLUMNATTR$,POS("K;"=COLUMNATTR$)+2,2),BuildAttr$+="K"

71
Language / Re: Easy way to split a numeric fixed string.
« on: December 05, 2019, 05:32:38 PM »
Mike,

Read data works well for Julian (your example) or without DTE on a formatted date. 
I am guessing but I suspect for String to Number, my original technique and the two PVX equivalents at the bottom of this reply will be very hard to beat on efficiency. 

Good reasons to use a structured (or composite) string technique are:
 1: because the original data is an un-formatted string and both original and parsed data are needed.
 2: A Variable fits better than a formula into a IOLIST and accepts assignment which a formula can not.
 3: in a tight loop of thousands/millions of records, READ DATA will run noticeably slower than either
     multiple num(substring) or the structured string approach. (2002 list date functions thread)
 4: Read/Assignment results can be fed directly into functions with implicit conversion.
     Dt$=DTM06$,DayOfWeek=NUM(DTE(JUL(Dt.Y,Dt.M,Dt.D):"%W") )
 5: Only one Dim of a string structure is necessary.  CLEAR or DIM must be used to remove\change structure.

Re # 3:  Your comments on the relative efficiency of these approaches will definitely be appreciated.

While not quite as simple and easy to remember as :N(len), strings to numbers can also be achieved with PVX composite string structures as in:

1 DIM Dt$:CPL("IOLIST Y:[NUM(4)],M:[NUM(2)],D:[NUM(2)]")
2 !
3 Dt$="20191105"
4 ?Dt.Y
5 ?Dt.M
6 ?Dt.D

1 IOL.dt: IOLIST Y:[NUM(4)],M:[NUM(2)],D:[NUM(2)]
2 DIM Dt$:iol=iol.dt
3 Dt$="20191105"
4 ?Dt.Y
5 ?Dt.M
6 ?Dt.D


72
Language / Easy way to split a numeric fixed string.
« on: December 05, 2019, 12:58:19 PM »
I was looking at some complicated date logic and thought of contributing this simple efficient technique example.   This uses the BBX string structures in PVX. 
The numeric and formatting validation is omitted.

1 DIM Dt$:"Y:N(4),M:N(2),D:N(2)" ! Structure is static and can be reused after ="" or read data from $$
2 Dt$="20191105"
3 ? jul(Dt.Y,Dt.M,Dt.D)
4 ? xfa(Dt$,"") ! Roughly equivalent to LST(IOL())
5 ?Dt.Y
6 ?Dt.M
7 ?Dt.D




73
Wish List / Re: XML -> JSON CVS Translator
« on: October 15, 2019, 11:51:59 AM »
Hi Josh,
Enjoyed meeting you at Direxions!

Since JSON is a data format similar to csv rather than a document format like xml, I suspect you will still have to modify the original programs for individual nodes.

I suggest making a simple object to return the JSON string when passed a node object using similar logic I use to import XML straight to data IOLISTs.

 tmp$=trn'node(n)'tag$+$24$
 VIA tmp$=trn'node(n)'value$

74
Programming / Error 12 instantiating an object
« on: October 09, 2019, 09:24:05 AM »
This might save you some time if you happen to run into it.

Was getting file error 12 on an object instantiation and I wasn't looking for this issue because the object is a file wrapper.  After eliminating the file as perpetrator, while I was expecting a 92 type error, I wasn't expecting this as I wouldn't have thought it possible.  (The mistake obviously!  ;))

In the Class Def, one of the functions had a trailing comma in the arguments as shown below.

FUNCTION FieldByIndexList(KeyStart$,KeyEnd$,Where$,KeyNo,FieldIdx,FieldDelimiter$,)FIELD_BY_INDEX_LIST

This did not throw a line error in the *IT or on a load list in version 2017, only on instantiation.

75
Nomads / configuring font in Parrallels
« on: August 23, 2019, 02:03:56 PM »
My font calculation is fine in windows, but nomads panels are too large in Parallels so that the window can exceeds the screen size calculated by the DEC($00$+MID(_X$,29,2))
Have determined that a parallels server is hosting the display and I am picking up that resolution for font sizing. 
Is there a way to identify when a nomads window will display in Parallels?
Is there a way to get the final client from Parallels?
Have a great weekend.

Pages: 1 ... 3 4 [5] 6 7 8