Hi, Pritpal In fact that demo prg was not meant to put in the distribution when I made it, but it does really make sense to write it properly anyways, so rest assured I'll pay more attention to demo code.
What do you think if in the future I could provide some isolated demos also? I know that demoqt.prg is a good showcase for the power of HBQt, but maybe adding isolated samples covering common basic uses may be good learning tools to newcomers. I would be glad to hear your opinions. Regards, Bacco On Wed, Feb 17, 2010 at 02:27, Pritpal Bedi <[email protected]> wrote: > > > Bacco wrote: >> >> Here are both, plus a sample in .prg >> > > Perfect. > > Viktor, I would like if Bocco himself commits. > > Bocco, however I have a concern in demo code: > > > >> bl := >> {|nw,ol|oWnd:setWindowTitle(Str(QT_QMODELINDEX_COLUMN(ol)+1)+Str(QT_QMODELINDEX_ROW(ol)+1)+' >> => '+Str(QT_QMODELINDEX_COLUMN(nw)+1)+Str(QT_QMODELINDEX_ROW(nw)+1))} >> > > Though code is perfect but it is not appropriate to call Qt wrapper > directly. > For this reason alone whe matching .prg class structure is in place. I know > the > above approach is a faster way to write but surely is not the desirable one. > > So, > > bl := {|nw,ol, oNw, qNw, qOl | qOl := QModelIndex():from( ol ), qNw := > QModelIndex():from( nw ), oWnd:setWindowTitle( Str( qOl:column() + 1 ) + > Str( qOl:row() + 1 ) + ' => ' + Str( qNw:column() + 1 ) + Str( qNw:row() + 1 > ) ) } > > Please also take note of proper formatting even in demo code. > > Also, it is better if this demo is embedded into hbqt/tests/demoqt.prg. > This way we will keep only one demo application. > > On the whole you have followed splendidly. > > ----- > enjoy hbIDEing... > Pritpal Bedi > _a_student_of_software_analysis_&_design_ > -- > View this message in context: > http://n2.nabble.com/I-want-to-participate-tp4583285p4584298.html > Sent from the harbour-devel mailing list archive at Nabble.com. > _______________________________________________ > Harbour mailing list (attachment size limit: 40KB) > [email protected] > http://lists.harbour-project.org/mailman/listinfo/harbour > _______________________________________________ Harbour mailing list (attachment size limit: 40KB) [email protected] http://lists.harbour-project.org/mailman/listinfo/harbour
