aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPStringAdditions.m
Commit message (Collapse)AuthorAgeFilesLines
* initial commit of SP_REFACTOR ifdefs, the start of a long quest to separate ↵sqlprodev2011-04-111-0/+2
| | | | UI code from functional code
* Fix more compiler warnings, including a few bugsrowanbeentje2011-03-071-1/+1
|
* - Fix more compiler warningsrowanbeentje2011-03-041-3/+3
|
* Fix more compiler warnings.stuconnolly2011-03-031-0/+15
|
* - Fix compiler warnings for MCPKit - largely typecast relatedrowanbeentje2011-03-021-12/+11
| | | | | | | | | - Fix further compiler warnings, including a couple of bugs - Disable the -wselector warnings (Multiple definition types for selector) as they're currently unsupported in LLVM - Disable the -wconversion warnings (Prototype conversion) warnings as we usually can't affect protocol declaration - Disable the -wstrict-selector-match (Strict selector matching) due to too many false positives
* fixed compiler warningssqlprodev2011-03-011-0/+1
|
* • fixed issue form redirecting output actions via exit codes if Bundle's ↵Bibiko2010-12-211-3/+3
| | | | | | default output action was None • renamed constants to avoid confusing
* • made usage of more constants to avoid double-storing stringsBibiko2010-12-121-11/+11
| | | | • fixed JavaScript alert and confirm window in HTML output window
* • Bundle command supportBibiko2010-12-101-1/+1
| | | | | - fix issue for shortcut recorder for Asian language input - finished JavaScript support inside the HTML output window to run BASH system commands via "var returnValue = window.system.run(cmd)" whereby cmd is either a normal string or an array of the dimension of 2 (command, processID)
* • Bundle CommandsBibiko2010-12-091-0/+3
| | | | | | - added shell vars SP_CURRENT_EDITED_COLUMN_NAME, SP_CURRENT_EDITED_TABLE for Input Field scoped commands if invoked from a table cell field editor - added shell var SP_TABLE_DATA_SOURCE (content or query) - fixed table row change trigger for custom query tableView
* • Bundle Editor: removed unnecessary tooltip; replace menu item title ↵Bibiko2010-12-081-2/+2
| | | | | | 'Save' by 'Export' • improved check whether a doc window has a connection or not for running a Bundle command
* • Bundle commandsBibiko2010-12-081-4/+14
| | | | - improvemed error handling esp. if no front most connection window can be found or it's not connected
* • Bundle commandsBibiko2010-12-081-29/+50
| | | | | | | - reworked invocation via keyboard short-cut to allow to fall back to General scope - added chance to redirect the output action via command exit codes; useful if the normal output is an HTML window but an error occurred, now one can display the error as tooltip for instance - unified file hand-shake file names by one uuid - made usage of more constants and renamed some shell vars
* • added SP_APP_RESOURCES_DIRECTORY as shell variableBibiko2010-12-071-0/+1
|
* • Bundle command supportBibiko2010-12-071-0/+2
| | | | | - fixed issue for commands without assigning a key equivalent - output table meta data about type, type grouping, length, auto_inc, PRI key etc. for Data Table scope commands and sequelpro url scheme command ExecuteQuery
* • finished implementation of SPChooseMenuItemDialogBibiko2010-12-061-16/+34
| | | | | • simplified bundle command handling and handling for bundle commands which have the same key equivalent to be able to group similar bundle commands • minor code improvements
* • forgotten to rename method signatureBibiko2010-12-021-1/+1
|
* • added chance to cancel an activity - up to now a running Bundle command ↵Bibiko2010-12-011-11/+10
| | | | | | - from the Activities pane (toggable via double-clicking at Table Information header); it's still tentative and the correct cancel icon will follow asap • added notification system for updating the activities pane (SPActivitiesUpdateNotification)
* • Bundle commandsBibiko2010-11-291-1/+34
| | | | | - register running commands for each SPDatabaseDocument or if the command runs via 'General' for NSApp delegate - kill all running commands before SP will be terminated
* • Bundle Command supportBibiko2010-11-261-0/+2
| | | | | | - added shell var SP_ICON_FILE - a bundle command which outputs its result as HTML window will write the data in the same window, ie it won't be create each time a new window; the window will be identified by the bundle's uuid - fixed issue while saving a short-cut in keybinding.dict format, now it ignores possible diacritics - maybe bug in ShortcutRecorder for method [aRecorder keyCharsIgnoringModifiers] since in the objectValue it's set correctly
* • added method 'rot13' to NSStringBibiko2010-11-251-0/+35
| | | | | | | | • Bundle Editor - fixed several GUI issues - added the chance to add meta data to each bundle - each added/duplicated bundle will get an unique UUID in order to be able to identify a Bundle for future purposes like an update detection for installed bundles - changed init process
* • Bundle EditorBibiko2010-11-231-1/+1
| | | | | | | - bailed out from approach to assign more than one scope to Bundle commands; now there're three scopes available: Input Field (incl. Query Editor since it only differs in current_query and insert_as_snippet which falls back to current_line and tooltip message), Data Table, and General (which means that these commands are available app-wide) - moved "Disable Command" to scope popup menu since it's related - Input Field and Data Table commands will be shown as submenus in the Bundles main menu; all General commands will be added without creating a special submenu (only Category submenus will be generated) - fixed and simplified several issues
* • renamed some shell variables for Bundle commandsBibiko2010-11-221-4/+4
| | | | • added sequelpro scheme commands: SelectTables, ReloadTablesList, ReloadContentTable
* • run a normal bash script without #! first line as /bin/sh file whereby ↵Bibiko2010-11-211-5/+12
| | | | stdout is redirected
* • added line numbering and current line highlighting to Bundle Editor's ↵Bibiko2010-11-211-4/+5
| | | | | | | command text view • made each Bundle in/ouptut file name unique to allow to run different Bundle commands at the same time • fixed minor issues for Bundle Editor
* • bash command which runs as NSTask will write STDOUT automatically to a ↵Bibiko2010-11-211-21/+36
| | | | temp file which will be read after the bash process finished; this approach avoids nasty pipe blocking due to block size etc. and speeds up reading in large amount of data
* • further work on Bundle EditorBibiko2010-11-181-18/+16
| | | | • generalised [NSString runBashCommand...]
* • Bundle supportBibiko2010-11-161-6/+15
| | | | | - further minor improvements - make usage of more constants
* • Bundle supportBibiko2010-11-161-4/+60
| | | | | | - further simplifications and centralizations - runBashCommandWithEnvironment: now it can execute each script command whose first line begins with #!/... natively - added some more shell variables
* • added to Bundle shell command these variables:Bibiko2010-11-111-1/+2
| | | | | | | | | | SP_ALL_DATABASES, SP_ALL_TABLES, SP_ALL_VIEWS, SP_ALL_FUNCTIONS, SP_ALL_PROCEDURES, SP_RDBMS_VERSION, SP_RDBMS_TYPE [hard-coded yet ;)] • some minor improvements to editor Bundle support • fixed issue while running a bash command that the SP GUI doesn't block • added first sequelpro url scheme functionality - sequelpro://$SP_PROCESS_ID/passToDoc/SelectTable/a_name - sequelpro://$SP_PROCESS_ID/passToDoc/SelectDatabase/a_db_name - sequelpro://$SP_PROCESS_ID/passToDoc/SelectDatabase/a_db_name/a_table_name
* • some improvements for sequelpro://process_id/command/param1/param2 url ↵Bibiko2010-11-111-1/+10
| | | | | | scheme support - introduced an unique process ID for each called bash command which will be set for the current SPDatabaseDocument and passed as environment shell variable SP_PROCESS_ID to ensure that such a scheme command will be executed by the correct SPDatabaseDocument, to avoid security issues ie one can authenticate such a sheme command, to enable url scheme process communication based on file shake-hands etc.
* • added to SPStringAddition the method ↵Bibiko2010-11-091-0/+104
| | | | | | | runBashCommandWithEnvironment:atCurrentDirectoryPath:error which will run self as bash command and will return its result - if an error occurred it will return a NSError if desired - added the chance to pass shell environment variables and start directory for future usage in user-definable plugins written as scripts
* • improved the TableStructure handling of GEOMETRY fields and their ↵Bibiko2010-10-251-1/+1
| | | | validations against non-valid WKT notations - return NULL if no header
* • fixed issue of unnecessary string escaping for importing spatial data ↵Bibiko2010-10-101-1/+1
| | | | | | via GeomFromText() • minor code cosmetics
* • enabled SRID editing of spatial fields via WKT stringBibiko2010-10-091-0/+27
| | | | | - the SRID value will be appended at the WKT string like POINT(1 1),101 which will be transformed to GeomFromText('POINT(1 1)',101) on the fly - otherwise the SRID information will be deleted after editing a geometry field
* Remove 10.4 related code and associated macros.stuconnolly2010-09-261-40/+6
|
* • further progress to support "Save Session" (all opened windows plus ↵Bibiko2010-06-241-0/+14
| | | | | | | including tabs connections) - loop through all windows and for each window through all tabs and save all untitled doc within the bundle named via UUIDs and all opened spf files • added the SPStringAddition method +[NSString stringWithNewUUID] which returns a new UUID string
* Merge export redesign branch back into trunk.stuconnolly2010-05-241-43/+67
| | | | | | | | | | | | | | | | | | | | | Includes a completely redesign approach to all export data types based on the use of NSOperation subclasses. CSV, SQL, XML and dot export types are currently functional, while the source files for PDF and HTML export types exist they are to be implemented, but are currently hidden from the interface. Also includes the following: - Completely redesigned export interface. - The ability to customize CSV NULL values. - The ability to specify whether the UTF-8 BOM should be used in SQL dumps. - The ability to specify whether BLOB fields are output as hex or plain text during SQL dumps. Defaults to hex. - Exporting currently selected tables via the tables list context menu. Outstanding issues: - Not all progress indicators for all export types are functional (or functioning correctly). - A few issues related to the introduction of only exporting the content and create and drop syntax of specific tables during SQL dumps. Needs some serious testing and benchmarking to ensure it replicates the current export functionality.
* Change filesize units to base 2 rather than base 10. Fixes issue #690. Patch ↵stuconnolly2010-05-181-4/+4
| | | | provided by Max Lohrmann, thanks Max!.
* Tidy up imports and fix 'Reverse Sort Order' when sorting connection ↵stuconnolly2010-03-311-2/+3
| | | | favorites (Thanks Hans).
* • added "componentsJoinedByPeriodAndBacktickQuoted" to NSArrayAdditionsBibiko2010-01-141-38/+3
| | | | • updated some methods in in SPStringAdditions to 10.5 code which avoid mutableCopy and they're faster
* - Upgrade Sequel Pro to be compiled as a 3-way PPC/i386/x86_64 binary for ↵rowanbeentje2010-01-091-26/+26
| | | | | | | release builds, including a large number of 64bit compatibility upgrades and tweaks - Upgrade RegexKitLite to 3.3
* - Use long longs instead of ints when looking at table sizes, free space, ↵rowanbeentje2009-09-011-2/+10
| | | | | | | | and row counts for display, fixing overflow issues (this addresses Issue #394) - Tweak the byte size formatter to also show TBs for very large numbers - Improve row count and auto increment value formatting by using a number formatter (enhancements for Issue #394)
* User Manager featuremltownsend2009-08-111-0/+36
|
* Merge framework integration branch back to trunk. Summary of changes:stuconnolly2009-07-211-1/+0
| | | | | | | | | | | | | | | - Includes all custom code from subclasses CMMCPConnection and CMMCPResult, meaning they have subsequently been removed from the project. - All previous Sequel Pro specific code in the above subclasses has been removed in favour of the delegate (currently set to TableDocumet) informing the framework of such information. - All references to CMMCPConnection and CMMCPResult have subsequently been changed to MCPConnection and MCPResult. - Framework includes MySQL 5.1.36 client libraries and source headers. - Framework is now built as a 4-way (32/64 bit, i386/PPC arch) binary. - All import references to <MCPKit_bundled/MCPKit_bundled.h> have been changed to <MCPKit/MCPKit.h>. - New script 'build-mysql-client.sh' can be used to build the MySQL client libraries from the MySQL source. See the script's header for a list of available options or run it with no arguments to display it's usage. Note that there are still a few changes to be made to the framework with regard to removing Sequel Pro specific calls to the delegate. These however can be made later on as they have no effect on functionality and are merely design changes. Also, note that any future development done on the framework should be made to be as 'generic' as possible, with no Sequel Pro specific references. This should allow the framework to be integrated into another project without the need for SP specific code.
* • added levenshteinDistanceOfWord: to SPStringAdditionsBibiko2009-07-131-2/+70
| | | | | - will be used mainly for auto-matching column names while csv import • fixed bug for in/decreasing the font size by using the two-finger gesture on a trackpad if a textView has a selection
* Improve custom query timing and display:rowanbeentje2009-06-271-5/+5
| | | | | | | - Amend timing using clock() to timing based on mach_absolute_time() (see revision comment on Google code) - Ensure the time returned is for the requested query and not subsequent helper queries - Use NSNumberFormatter to return a localised "< 0.1 ms" rather than the hardcoded Euro-style "< 0,1 ms"
* • fixed: avoid displaying µs for query execution timeBibiko2009-06-191-3/+7
| | | | | - minimum resolution now is set to 0.1ms - display “< 0,1ms” if time is less than minimum resolution
* • some tiny improvements to speed up queryString:Bibiko2009-06-181-2/+5
| | | | | | | | | - cache the function pointer for delegate willPerformQuery: - if Console Log window is NOT visible suppress reloadData and scrolling to last line (this speeds it up remarkably); if user opens the Console log window it will be synchronized - timeIntervall for execution time will be divide by CLOCKS_PER_SEC in [NSString stringForTimeInterval] - removed for utf8 enc in cString the return UTF8String (no significant difference) • now execution time shows only the time for mysql_real_query
* • some improvement to speed up queryString:Bibiko2009-06-171-0/+6
| | | | | | | - caching of delegate && respondsToSelector - use clock() to calculate query's execution time • converting to cString: if utf8 encoding make usage of UTF8String • added to StringAddition to display µs for a timeIntervall
id='n1379' href='#n1379'>1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746