Discussion forum about PANORAMIC language

Mac, Windows & Android application development with PANORAMIC language
 
HomeFAQSearchRegisterMemberlistUsergroupsLog in
Latest topics
» Hello world.
by Mon Jun 19, 2017 1:37 am

» Biomorphes de PICKOVER
by Sun Jun 18, 2017 2:33 am

» In less than 10 lines of code
by Fri Jun 16, 2017 5:03 am

» Effect Dopler
by Fri Jun 16, 2017 3:29 am

» SuperEllipse
by Wed Jun 14, 2017 4:01 am

» Plants
by Wed Jun 14, 2017 3:38 am

» Mira's attractor
by Wed Jun 14, 2017 3:30 am

» Triangle of Sierpinski
by Wed Jun 14, 2017 3:22 am

» Esthétique polaire
by Wed Jun 14, 2017 3:16 am

» Butterfly effect : Lorenz equations
by Wed Jun 14, 2017 3:08 am

» Collision detection
by Tue Jun 13, 2017 5:09 am

» The Bees Laline Paull Epub Books
by Mon Oct 10, 2016 8:58 pm

» PANORAMIC for Mac OSX 10 is available
by Tue Aug 09, 2016 6:08 pm

» ide
by Sat Jul 16, 2016 12:27 am

» Can I change the program icon/logo in my application ?
by Thu Jul 07, 2016 3:32 am

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Share | 
 

 Java Progress Bar issue (programming)?

View previous topic View next topic Go down 
AuthorMessage
Severin



Number of posts : 19
Localisation : Germany/Braunschweig
Registration date : 2010-12-13

PostSubject: Re: Java Progress Bar issue (programming)?   Sat Mar 30, 2013 8:01 am

****************************************
PANORAMIC V 0.9.24 ist verfügbar
PANORAMIC V 0.9.24 is available
PANORAMIC V 0.9.24 est disponible
PANORAMIC V 0.9.24 es disponible

Das Forum Panoramic ist wieder aktiv.
Bitte besucht uns.

The forum Panoramic is active again.

Please, visits us.

Le forum Panoramic est actif de nouveau.

S'il vous plaît, nous visite.

El foro Panoramic es de nuevo activo.

Por favor, nos visita.
********************************************
Back to top Go down
View user profile
ygeronimi

avatar

Number of posts : 14
Age : 46
Localisation : France
Registration date : 2013-03-13

PostSubject: re   Sat Mar 30, 2013 3:56 pm

look at this (with Vs 0.9.24 ) :
Code:
' With Panoramic 0.9.24
Variables()
Labels()
Interface()



end

Sub Variables()
  dim x%,y%,Cpte%,file$,line$

End_sub

Sub Labels()
  Label Selection,View
End_Sub

Sub Interface()
  font_name 0,"Arial" :font_size 0,10
  Dlist 1
  Edit 2  :top 2,25 :left 2,10 :width 2,250
  Button 3:top 3,25 :left 3,270:height 3,21 :width 3,21:caption 3,"...":font_bold 3
      cursor_point 3 :hint 3,"Select file":on_click 3,Selection
  Memo 4  :top 4,50 :left 4,10 :height 4,height(0)-150 :width 4,width(0)-36
  Progress_bar 5 :top 5,height(0)-83 :left 5,10 :width 5,200 :Min 5,0:max 5,100
  Alpha 6 : top 6,Top(5):left 6,left(5)+210 :Caption 6,"0 % "
End_Sub

Selection:
  if object_exists(100)=0
      Open_dialog 100
  end_if
  clear 1 :clear 4:text 2,"":cpte%=0:position 5,0
  caption 6,"0 %"
  file$=file_name$(100)
  if file$<>"_"
      text 2,file$
      file_load 1,file$
      gosub view
  end_if
return

View:
  y%=count(1)
  for x%=1 to count(1)
    line$= item_read$(1,x%)
    item_add 4,line$
    cpte%=(100/y%)*x%
    position 5,int(cpte%)
    caption 6,str$(cpte%)+" %"
    pause 100
  next x%
return


Last edited by ygeronimi on Sat Mar 30, 2013 7:54 pm; edited 2 times in total (Reason for editing : correction for open_dialog)
Back to top Go down
View user profile
Klaus

avatar

Number of posts : 18
Age : 68
Localisation : France
Registration date : 2013-03-23

PostSubject: Re: Java Progress Bar issue (programming)?   Sat Mar 30, 2013 6:37 pm

Very nice demonstration of the progress bar. But:

Please change the Selection subroutine to the following code:
Code:
Selection:
  if object_exists(100)=0
      Open_dialog 100
'  else
'      show 100  : ' useless on an invisible object
  end_if
  clear 1 :clear 4:text 2,""
  file$=file_name$(100)
  if file$="_" then return  : ' exit if no file selected
  text 2,file$
  file_load 1,file$
  gosub view
return

1. an OPEN_DIALOG object is invisible by definition, so the SHOW command is useless
2. you have to check if a file is selected, otherwise the program crashes.
Back to top Go down
View user profile http://klaus.panoramic.voila.net/
ygeronimi

avatar

Number of posts : 14
Age : 46
Localisation : France
Registration date : 2013-03-13

PostSubject: re   Sat Mar 30, 2013 7:48 pm

The code has been corrected... Laughing

You can ask the "Open_Dialog" every time as you want... Wink
and exit it without selected file... Laughing
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: Java Progress Bar issue (programming)?   

Back to top Go down
 
Java Progress Bar issue (programming)?
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» Issue - Selenium checks object in some cache
» Verify command when used with Java,JUNIT and Eclipse
» opera browser not loading the page using selenium Rc(Java)
» JAVA tunnel Based UAE Solution Available in Just $149 @ VoIP
» Got My Copy of Nintendo Power's Final Issue!

Permissions in this forum:You cannot reply to topics in this forum
Discussion forum about PANORAMIC language :: Panoramic for Windows :: Source code (snippets)-
Jump to: