Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/25/20 in all areas

  1. Hi everyone, In response to a request from a member I have put together a simple little project to help him/her get going with using Bootstrap with uniGui. I am re-posting it here with the hope that it might help others who are interested in the topic and don't know how to get going. I have called the project uniGui-Bootstrap Starter Project and provided a link below. It addresses issues like: - What you need to use Bootstrap - How to populate a Bootstrap page with uniGui data (e.g. table records). - How to handle Bootstrap page mouse-clicks. The project uses only one uniGui component, the uniURLFrame. Everything else is done in HTML + jQuery + CSS. I have inserted a bit of in-line documentation in main.pas and in both the HTML and Javascript files to help web-application newbies. I put this together in a very short time so apologize for any bugs or things I have overlooked. I personally think a lot of magic is possible with uniGui + Bootstrap, e.g. it is so simple to build applications that would work equally well on any device (with some caveats). I would welcome some feedback, e.g. how many members think we should have a new Browse Section call Bootstrap? Enjoy. Bootstrap-uniGui StarterProject.zip
    2 points
  2. Hello, all. If I create a new unigui component at runtime: var aNewUniComponent: TObject; begin aNewUniComponent:=TUniDBMemo.Create(self); ... then I wish to associate it with a Data Field. I know it's a data-aware control, so I should be able to do the following: TUniDBEdit(aNewUniComponent).DataField:='aFieldName'; whether it's a TUniDBEdit, TUniDBMemo, TUniDBNumberEdit, etc. This fails, however, with an access violation, although I am not sure why, and only works with the exact same class: TUniDBMemo(aNewUniComponent).DataField:='aFieldName'; otherwise I may get an Invalid Pointer Operation error. My Question is if there is a Class from which all data-aware unicontrols descend such that I can typecast without access violations, such as TUniDBControl(aNewUniComponent).DataField:='aFieldName'; Other wise I need to use a series of if then else statements like: if ClassName='TUniDBEdit' then TUniDBEdit(aNewComponent).DataField:='aFieldName' else if ClassName='TUniDBMemo' then TUniDBMemo(aNewComponent).DataField:='aFieldName' else if ClassName='TUniDBNumberEdit' then TUniDBNumberEdit(aNewComponent).DataField:='aFieldName' else etc. or perhaps there is a better way? Thank you in advance Doug
    1 point
×
×
  • Create New...