Jump to content

RobYost

uniGUI Subscriber
  • Posts

    207
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by RobYost

  1. RobYost

    Training

    David, Are you going to post your best practices document when you are done with it?
  2. There may be an easier way, but I put an image on the form that lines up where I wanted it. It works for me.
  3. RobYost

    Thread Safe

    I am trying a PayPal component. Some of the components work, but 1 does not. It immediately crashes. I am going to ask their support department for help, but first I have a question. I wrote a VCL application and a UniGUI application that accesses the component (non-visual) The VCL one works and the UniGUI one does not. There are only 5 lines of code in each and they are identical. ppSearch.Password := '----------------------'; ppSearch.Signature := '------------------------------------------'; ppSearch.URL := 'https://api-3t.sandbox.paypal.com/nvp'; ppSearch.User := '------------; ppSearch.SearchCriteriaStartDate := PayPalStartDate(IncMonth(now - 2)); ppSearch.Search; Does this mean their component is not thread safe? I just wanted to make sure I was asking their support the right question. Thanks Rob
  4. I don't know about EurekaLog, but I use FastMM4 http://sourceforge.net/projects/fastmm/ unzip and add to tools->options in project: uses {$IFDEF DEBUG} FastMM4 in 'Helper\FastMM4.pas', {$ENDIF } somewhere early in your program. I put it in UniLoginFormCreate: System.ReportMemoryLeaksOnShutdown := True; When you shut down it pops up a report if there is a leak.
  5. This allows integers only. function OnKeydown(sender, e) { var ok = event.keyCode == 8 || //backspace event.keyCode == 9 || //tab event.keyCode == 13 || //enter event.keyCode >= 35 && event.keyCode <= 37 || //end, home, left arrow event.keyCode == 39 || //right arrow, downd arrow, insert, delete event.keyCode == 45 || //insert event.keyCode == 46 || //delete event.keyCode >= 96 && event.keyCode <= 105 || // 0-9 on keypad event.keyCode >= 48 && event.keyCode <= 57; // 0-9 if (!ok) { e.preventDefault(); } }
  6. I determined that it worked if I used HTTP but not HTTPS. BUT after not getting it to work, I made a small test program to show to Delphi Developer. In the test program I changed it from <embed> to <iframe> like he said and it worked. So he gave me the answer all along and I didn't try it because I could get it to work on my computer. Once again Delphi Developer came through with the answer. Just trust him.
  7. I just noticed I used a Type that I wrote: TSQL I created it so I wouldn't have to create and free TStringList, and the text property is useful when debugging 'Copy Value' does not have any CR LF in it so I can paste it to SQL Server. You can replace the TSQL with TStringList (but you have to create it) I will include the TSQL Source if anyone is interested in it. Let me know if you see a problem with it. type TSQL = record private FItems: array of string; FText : String; function GetCount: integer; inline; function GetText: String; inline; function GetItem(index: integer): string; procedure SetItem(index: integer; const Value: string); public property Text : string read GetText; property Count: integer read GetCount; function Add(const line: string): integer; procedure Clear; function IndexOf(const s: string): integer; property Items[index: integer]: string read GetItem write SetItem; default; end; // ============================================================================= function TSQL.Add(const line: string): integer; begin SetLength(FItems, Count + 1); FItems[Count - 1] := line; Result := Count - 1; FText := Text; end; // ============================================================================= function TSQL.GetCount: integer; begin Result := length(FItems); end; // ============================================================================= function TSQL.GetText: String; var i: integer; begin for i := 0 to Count - 1 do Result := Result + ' ' + FItems[i]; end; // ============================================================================= procedure TSQL.Clear; begin SetLength(FItems, 0); end; // ============================================================================= function TSQL.GetItem(index: integer): string; begin Result := FItems[index]; end; // ============================================================================= procedure TSQL.SetItem(index: integer; const Value: string); begin FItems[index] := Value; end; // ============================================================================= function TSQL.IndexOf(const s: string): integer; var k: integer; begin Result := -1; for k := 0 to Count - 1 do begin if FItems[k] = s then begin Result := k; break; end; end; end;
  8. I have a procedure that works at playing Youtube videos. But it only works if you are on the same computer as the UniGUI program that is running.l I put it on my server and when on the server it works, but if I try from across the internet it does not. Is there a port that needs to be opened? (Video is a TUniHTMLFrame) procedure TfrmModal.ShowVideo(VideoName: string; VideoWidth: Integer; VideoHeight: Integer); var sql: TSQL; begin frmModal.Height := VideoHeight + GetSystemMetrics(SM_CYCAPTION); frmModal.Width := VideoWidth; sql.Add('<html>'); sql.Add('<head>'); sql.Add('</style>'); sql.Add(' <style type="text/css">.recentcomments a{display:inline !important;padding:0 !important;margin:0 !important;}</style>'); sql.Add('</head>'); sql.Add('<body>'); sql.Add(' <object width="' + itoa(VideoWidth) + '" height="' + itoa(VideoHeight) + '">'); sql.Add(' <param name="movie" value="http://www.youtube.com/v/fqNHsmGCEDI&hl=en_US&feature=player_embedded&version=3">'); sql.Add(' </param><param name="allowFullScreen" value="true">'); sql.Add(' </param><param name="allowScriptAccess" value="always">'); sql.Add(' </param><embed src="http://www.youtube.com/v/' + VideoName + '&hl=en_US&feature=player_embedded&version=3" type="application/x-shockwave-flash" sql.Add('');allowfullscreen="true" allowScriptAccess="always">'); sql.Add(' </embed></object>'); sql.Add('</body>'); sql.Add('</html>'); Video.Align := alClient; Video.Enabled := True; Video.HTML.Clear; Video.HTML.Add(sql.Text); end;
  9. This is not a question for the Unigui team, but does anyone know how to start in building a FAQ? I would like to add a FAQ to my software, but I don't know where to start. I can't find any information on how to implement the fuzzy search logic.
  10. Thanks, I don't have IIS running on my server. Right now I have the website hosted elsewhere. All I have running is my unigui software. Should I start IIS and have no websites, but put in the redirect?
  11. I figured out how to do it. I created a subdomain named: secure then forwarded subdomain login to: https://secure.simpile-landlord.com This seems to work with all cases
  12. I have my program running on port 443. If you connect: https://login.simple-landlord.com if connects fine. but if you connect: http://login.simple-landlord.com it does not connect. Is there something like web.config that I can set up to redirect HTTP to HTTPS?
  13. Thank You. I'm sorry I (and other people) keep asking questions like this and the answer always seems to be some sort of JavaScript code. It seems it would be easier for you if when we ask a question like this you add this line of code to the event (in this case OnSelect) then no one will ask that question again. If that is too hard would one of you write an example of how to override the OnSelect (or any of them) event and we (your customers) can keep a wiki of descendant components?
  14. Changing the InputMask.Mask seems to have no effect when I change it at runtime.
  15. RobYost

    TUniDate

    If you place a TuniPanel over a TUniDateTimePicker, the Date control is on top of the panel. It looks correct at design time but at run time it is on top. Also, when you multi-select TUniDateTImePicker it does not keep the selection dots around it like the other controls do, so it is hard to tell if it is selected.
  16. RobYost

    TUniStringGrid

    I don't see the TopRow property. How do I know if they have scrolled down to the top row is not 1? Also, I have FixedRows set to 1, but scrolling moves my first row. How do I work around this?
  17. Using the delphi code eats some of the characters. I tried: UniSession.AddJS(' document.getElementById("' + edtTenantFirstName.JSName + '_id").style.textTransform = "capitalize"'); in UniFormShow But nothing seems to happen. I wasn't where to try this code: function ucFirstAllWords( str ) { var pieces = str.split(" "); for ( var i = 0; i < pieces.length; i++ ) { var j = pieces[i].charAt(0).toUpperCase(); pieces[i] = j + pieces[i].substr(1); } return pieces.join(" "); }
  18. I am trying to capitalize the first letter of each word in a TUniEdit control. Things that are working in a VCL application are not working for me. For example changing Key in KeyPress has no effect on the Sender.Text Key := UpCase(key); // This works in VCL but not Uni I need something more complicated so this is just an example.
  19. I would like to create a control with TUniEdit as its ancestor. I would like it to SelectAll when the user clicks or tabs to it. TUniRyEdit = class(TUniEdit) private protected procedure GotFocus (var Msg: TMessageEvent); message CM_GOTFOCUS; public published end; procedure Register; implementation { TUniRyEdit } procedure Register; begin RegisterComponents('UniYostPak', [TUniRyEdit]); end; { TUniRyEdit } procedure TUniRyEdit.GotFocus(var Msg: TMessageEvent); begin SelectAll; end; end. But the SelectAll is never called. Is there a better way to accomplish this? I don't want to add code to every edit control to selectall when it receives focus
  20. RobYost

    Neptune Theme

    All themes look OK in my program except Neptune. It seems to use a larger font, so things don't fit quite right in my grids. I looked in 'C:\Program Files (x86)\FMSoft\Framework\uniGUI\unipackages\themes\Css' but I don't see the neptune theme. Is there a way to change Neptune to fit properly? If so, where is it located, what do I do to make UniGui recognize the changes?
  21. https://github.com/d...abbler/codesnip -> desktop applicaion http//snippets.delphidabbler.com -> on web why not on with unigui both these give me a 404
  22. I was able to get fontawesome working with the stars font. http://forums.unigui.com/index.php?/topic/8717-5-star-rating/ This thread shows the process. I am using version 3, I see you are using version 4. If I get some time I might try to update and see if there are any differences. But, for me the steps were: Put the css file in ServerModule->CustomFiles ServerModuleBeforeInit: procedure TUniServerModule.UniGUIServerModuleBeforeInit(Sender: TObject); begin MimeTable.AddMimeType('eot', 'application/font', False); end; Put the font files in the font folder: fontawesome-webfont.eot fontawesome-webfont.woff fontawesome-webfont.ttf
  23. Could you let us know if it works for you? You might also want to look at: http://www.sync-components.com
×
×
  • Create New...