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 - jep

Pages: 1 ... 5 6 [7] 8 9 ... 26
91
Rexx / Re: RFC: A pretty-print processor?
« on: 2010.07.25, 22:14:34 »
Hello,

I personally would prefer not - paper size should be customizable... sotmeplace). A4 will cause all sorts of problems in the US, as I suspect that Letter would elsewhere. Many printers will hang on an A4 page, waiting for the user to put A4 sized paper into it (they are generally configured for Letter or Legal in the US - never seen A4 as a default). And in OS/2's case, often the print queue will just hold on to the document forever (Or until the printer settings are changed and A4 is loaded into it) with either a "Document mismatch" or "forms mismatch" error.

It should be very easy to create a small list of A4, Letter, Legal, non-US Legal size, maybe a few envelope sizes, etc that the user can then call by name. For instance (sizes totally made up because I am too lazy to look them up right now):

paper.Letter="320,480"
paper.A4="310x492"

etc...

Best,
Rob
In that case we need to specify the measurement unit to use
paper.label='A4'
paper.dimensions="210,297"
paper.units = 'mm'

or

paper.label='A4'
paper.dimensions="21,29.7"
paper.unit = 'cm'

etc.
but also

paper.orientation = 'Portrait' (default, can be set with anything that begin with P)
or
paper.orientation = 'Landscape' (can be set with anything that begin with L)


//Jan-Erik

92
Rexx / Re: RFC: A pretty-print processor?
« on: 2010.07.25, 16:46:02 »
Hi warpcafe,

Hej Jep,

Can you please therefore also write down some initial thoughts of how to call the rexx funtions to use with parameters, what they should do and mean etc.

that's easy as duck soup. OK, so you want some details?
This is what I need the DLL to do in its first release:
Note 1: No error-handling implicitly described. Obviously, each function should set an RC variable...
Note 2: All of the below is available in PdfLib 7 AFAIK ...and also part of any standard "printer object" API... more or less "flavored"...

pdfLoadFuncs()
one only has to pass the calls to functions in the library "PDFlib Lite 7", to do that?

Please provide the link to the actual library again.
...
Well, that's all I need for the first round. :)
- text justification stuff can be easily figured out by using pdfTextWidth and pdfSetCurrPos
- no line feed stuff needed in first round, this can be programmed by using pdfSetCurrPos
- no watermark or signature or hyperlink crap needed now
- almost everything basic is feasible with these functions

Hope I was able to somehow explain what I meant.
Cheers,
Thomas
Very well thought out I must say.
I can therefore look a bit beyond since you've specified all of that...

How should each function behave when the user doesn't follow the exact schoolbook example?
e.g. one doesn't want to provide all the info, in the function pdfStartDoc( title, author, comments, keywords ).
How should it handle situation where the user just provide 1, 2 or 3 of the parameters?

What if no parameter will be provided?
Should it return a list of taken handles then?

Can we reuse some of the functions to behave differently if the input contain fewer/more parameters?
e.g. return information in some situations, default to something (next "row") etc.

Should some functions allow for input of stems as well?
Especially those functions that contain coordinates.

Possible to manipulate more than one PDF at the time as you indicate that the function pdfStartDoc( title, author, comments, keywords ) should return a handle?
Should the user be able to specify an associated "name" for the handle as an option as the actual handle anyway will be passed around internally by the rexx library?
(rexx only use plain text to represent variables, so "handles" and other non-integer/non-character parameters has to be either converted or associated with a "name")
pdfStartDoc( title, author, comments, keywords[, doc_handle ] ) RETURNS doc_handle

Let's say the script take a long time to complete adding data because it wait for information from ... somewhere.
Does the underlying library allow that or should all data be provided before the actual output?
If so, can you add a pdfPrint( doc_handle ) or pdfCreate( doc_handle ) that does the actual printout/creation.

Paper Size?
Do we always assume A4 and in Portrait mode?

//Jan-Erik

93
Rexx / Re: RFC: A pretty-print processor?
« on: 2010.07.17, 20:17:18 »
Hello,

warpcafe, provide a link to the package and how/what the rexx dll should do.

We may want to discuss what functions should be provided and how do those things in rexx.
Can you please therefore also write down some initial thoughts of how to call the rexx funtions to use with parameters, what they should do and mean etc.

I can give you (all, and not only Thomas/warpcafe) hints how to write the C/C++ code for the rexx dll.

It should be fairly easy and not take that much to write the rexx functions with OpenWatcom as it provide a GUI for the compiler.
The problems may be if you come up with ideas of new wild things to do ;D

//Jan-Erik

94
Applications / Re: QT 4.6.2 apps screen corruption
« on: 2010.07.02, 16:33:47 »
OK,
Thank you for the reply Rudi.
I'll ditch WarpOverlay then.

When can we expect the more stable Arora?  :P

//Jan-Erik

95
Applications / Re: QT 4.6.2 apps screen corruption
« on: 2010.07.01, 13:32:35 »
You mean that a left over entry for C1 that include WarpOverlay may cause the problems?

//Jan-Erik

96
Applications / Re: QT 4.6.2 apps screen corruption
« on: 2010.06.30, 19:09:08 »
Hello,

yes that cured the problem for me with the isntalled QT apps.
I've got an ATI RV670 Card (ATI Radeon HD 3870 and 512 MB GDDR4 from GeCube) that I have to use Panorma with.

Now it's just the problem with Arora.

//Jan-Erik

97
Applications / Re: QT 4.6.2 apps screen corruption
« on: 2010.06.30, 16:15:13 »
Thank you Pete,

I'll check that and tell you the outcome.

Is it because of my Graphics Card, driver used or...?

//Jan-Erik

98
Applications / QT 4.6.2 apps screen corruption
« on: 2010.06.30, 13:36:25 »
Hello,

I've installed a few QT apps (SMPlayer 0.6.9 and Arora etc.) that all seem to have the same problem...
screen corruption as soon as I try to use them.

The tooltips cause the background to show through, move the window and the desktop/background will bleed through until you e.g. put another window in front of it etc.
Previous version of QT (3?) doesn't seem to have the same problems at all other same machine with e.g. the SQLLite Browser.

SMPLayer can't show any files either... so I have to use MPlayer alone.
QT doesn't render the SMPlayer settings window properly, unless I put another window in front of it for a moment.
Arora seem to have the same problem, especially for areas where it doesn't redraw often like the buttons and background next to the buttons as well as the scrollbars.
I can also see that Arora is unstable, but I haven't checked the logs, but suspect that is has to do with what Rudi replied to in another thread.

Any idea's why?
Suggestions?

//Jan-Erik

99
Rexx / Re: Call SYSSLEEP 60 - do not work after reboot
« on: 2010.05.27, 17:03:03 »
Hello,
the documentation for classic rexx was written way before the current realease of RexxUtil and the support for decimal numbers instead of full seconds (integer) was therefore not even thought of in that release.

RexxUtil that come with eCS is at the level of Object Rexx and therefore contain alot of extra neat stuff that you can need to read about in either the Object Rexx help or Rexx Tips & Tricks.

Regarding queues, Yes, the output can be read line by line with something like

Code: [Select]
/* Clear session queue in case it contain "garbage" from a previous run */
'@rxqueue SESSION /CLEAR'

/* Try to determine the scanner, send output to the app rexxqueue, that place it in the rexx queue */
'@scanimage -L | rxqueue SESSION /FIFO'
/* Read the first line from the rexx queue */
parse value LINEIN( 'QUEUE:' ) with 'device `'cfg.device"' is a" cfg.scanner.manufacturer cfg.scanner.name cfg.scanner.model cfg.scanner.type 'scanner'
//Jan-Erik

100
Rexx / Re: Call SYSSLEEP 60 - do not work after reboot
« on: 2010.05.26, 14:00:44 »
Thx, will try it. That's the kind of information I've searched for in the help files. Unfortunately the REXX help is kind of useless compared to most other language docs I've read. I find it rather hard to start REXX programming with the help files I found installed on my eCS system. Now I've new buzzwords to search for...

The documentation mention built in "Functions", basic functions that are parts of the Rexx langauge itself.

Functions that begin with "Sys" is part of the RexxUtils package and extend Rexx and has to be loaded in your script before you can use them, the docs therefore mention those in a separate branch. The code waruyan mention can be found directly in the tree view (Contents Tab) for the "REXX Utility Functions (RexxUtils)" package, that belong to that perticular package and what you can do with them under that branch.

The documentation for Classic Rexx is easier to read (says "OS/2 Procedures Langauge 2/REXX" in the titelbar) than "Object REXX Reference". The documentation may take some time to get accustomed to, but it do provide alot of info you may need in a convenient way.

"Rexx Tips & Tricks" give you the extra-in-depth-knowledge that the basic documentation has left out.



'@call ping 'DomainName' 1000 1 >ping_tmp.txt'

You can later also try to send the output to a rexxqueue and a rexx variable instead of a file if you'd like that.


call somehing()
(paranthesis after first function name) was allowed in earlier releases of Regina (<3.2?) but that doesn't follow the standard. Use (...) with
say my_own_function(...)
If my_other_function(...) = 1 Then
etc. where "..." can be any parameter you want.

101
Hi,

The speed you can expect is equivalent to any other C/C++ application, since rexx basically should call dll's to do video to image processing and display embedded GUI components/controls. Test the rexx part of e.g. GBM and you'll see. GBM provide a wide veraiety of image editing solutions if you can write C/C++ code. Adding rexx functions "on top" is compared to that quite easy.

Parts that use interpreted rexx code are slower, Yes, but those parts usually doesn't require speed as user input often limit more. It depends on what the developer do with rexx or let specialized code handle instead. You can't even notice that some GUI applications has been written in rexx as they rely on addon dll's to do e.g. the number crunching that rexx wasn't meant to handle.

Chris Wolgemuth wrote as part of a larger project DrDlgCtrl e.g. a new Image viewer control for DrDialog, it's fast and responsive as a developed DrDialog rexx app just has to deal with the stuff it does the best (strings/text/get/set settings) while the dll itself handle input and data interpretation of the binary images and display the results.

I think eCo Software has developed a control that should be very appropriate as a video sequence view port, then one just need a few rexx functions or a wrapper to be able to add it to e.g. DrDialog, VX-Rexx and/or GpFRexx as an embedded control. Then we'd have a native OS/2-eCS centric solution that behave as an OS/2-eCS app. should and we don't have to reinvent the wheel.

It's easy to call ffmpeg.exe and mencoder.exe etc. directly, but if they're rewritten as dll's they'd blend in more nicely.

//Jan-Erik

102
Events / Re: Second unofficial Warpstock Video
« on: 2010.04.01, 12:34:31 »
Very nice as well!

Nice graphics and coloring, well laid out etc.

Such sneak peaks make the mouth water and the need to try it higher. ;D

Any plan to create an educational movie that show how to do basic things in the OS as well, like a sneak peak of how things work, consepts specific to the OS?

//Jan-Erik

103
Applications / Re: HELP!!!!!!!
« on: 2010.03.23, 16:57:32 »
Hello,

command you use is TEDIT

Press e.g. Esc to be able to edit the text.
F2 Save changes
F3 Quit

104
Applications / Re: HELP!!!!!!!
« on: 2010.03.22, 16:43:49 »
Hi Dennis,

Can you boot from the installation CD and go to the maintenance console?
Do a check disk?
First without writing corrections to the disk, then use dfsee.
Perhaps check how much data you have left free on the drive?
Is it possible that the disk may be failing?



105
Rexx / Parse a CSV-file and create a stem.
« on: 2010.02.28, 11:29:46 »
Marked as: Easy
Hi,

this time I've looked at the file that the crc32 script* created to illustrate what one can do with the data to build a stem (array of values)

The function build a stem (array of values) in the form
csv.first_column_name.1
csv.first_column_name.2
...
csv.first_column_name.n
csv.second_column_name.1
...
based on what it can find on the first row.

You can also alter the behavior to the more traditional stems with integer values
csv.1.1
csv.1.2
...
csv.1.n
csv.2.1
...
if you remove the comment around "integer_style = 1"

You have the opportunity to specify how many rows should be parsed just as if you'd import the file with OpenOffice.org Calc, Lotus Smartsuite 123 or similar.
Specify a number as the second argument to the function to create a stem as a preview of just a few rows.

The delimiter character specify how to split up each row, while the symbol for quotation mark specify how to strip characters that surround text.


*Other applications also create and can use csv-files, so you can use this for other purposes as well.

Code: [Select]
/* Example how to parse a csv-file */

delimiter = ',' /* Change to the C2D(...) function for some characters like tab */
quotation_mark = '"'
/* integer_style = 1 */
CALL ParseCSV ARG(1)
IF csv.0 > 0 THEN
DO
    total = csv.1 /* total contain the name or number of the first column, we reuse the variable and dont use another */
    total = VALUE( 'csv.'total'.0' ) /* We assume that every column contain equally many rows */
END
ELSE RETURN 0

DO i = 1 TO total
    DO j = 1 TO csv.0
        col_name = csv.j
        SAY csv.col_name.i
    END
END

RETURN 0
/* Remove the line "RETURN 0" above to get to the code below */

/* Code below is specific to the file produced with the crc32 script */
DO i = 1 TO total
    j = i + 1
    DO WHILE csv.crc32.i = csv.crc32.j
        IF csv.filesize.i = csv.filesize.j THEN
        DO
            IF csv.computer.i <> csv.computer.j & csv.path.i = csv.path.j THEN j = j + 1
            ELSE DO
                SAY 'Delete 'csv.drive.j||csv.path.j||csv.name.j||'? (y/N)'
                PARSE PULL answer
                IF LEFT( TRANSLATE( answer ), 1 ) = 'Y' THEN /* Anything else than Y followed by Enter will be interpreted as NO, just Enter = NO as well */
                    '@del "'||csv.drive.j||csv.path.j||csv.name.j||'"'
            END
        END
        j = j + 1
    END
    i = j
END

RETURN total

ParseCSV: PROCEDURE EXPOSE csv. delimiter quotation_mark integer_style
    f_name = ARG(1)
    csv.0 = 0
    i = 0
    CALL STREAM f_name, 'C', 'OPEN'
    DO WHILE LINES( f_name ) > 0
        IF i = ARG(2) THEN RETURN 0 /* Only parse a few rows specified by ARG(2) */
        input = LINEIN( f_name )
        j = 0
        DO WHILE LENGTH( input ) > 0
            PARSE VALUE input WITH i_val(delimiter)input
            j = j + 1
            IF csv.0 = 0 THEN /* Build "header", use the names on the first row specifying the column names */
            DO
                IF VALUE( integer_style ) <> 'INTEGER_STYLE' THEN
                DO
                   csv.j = j
                   c_val = csv.j
                END
                ELSE DO
                    csv.j = TRANSLATE( STRIP( STRIP( i_val,, quotation_mark ) ) )
                    c_val = csv.j
               END
            END
            ELSE /* build the rows, use the names found on the first rows */
            DO
                c_val = TRANSLATE( csv.j )
                CALL VALUE 'csv.'c_val'.'i, STRIP( i_val,, quotation_mark )
            END
            CALL VALUE 'csv.'c_val'.0', i
        END
        IF csv.0 = 0 THEN
            csv.0 = j
        i = i + 1
    END
    CALL STREAM f_name, 'C', 'CLOSE'
RETURN

Example how the crc32.csv-file look like (with the addition of filesize not posted here in the forum yet)
"COMPUTER","DRIVE","PATH","NAME","CRC32","MODIFIED","FILESIZE"
"COMPUTERNAME","C:","\PROGRAMS\DSSAVER\Modules\PrClock\Digi\","38.png","007FB5DF","2006-01-12 13:31:30","282"
"COMPUTERNAME","D:","\CRC32TEST\PROGRAMS\DSSAVER\Modules\PrClock\Digi\","38.png","007FB5DF","2006-01-12 13:31:30","282"

Pages: 1 ... 5 6 [7] 8 9 ... 26